How to have my results in different sheets in one workbook?
Closed
wilnap
Posts
1
Registration date
Monday March 14, 2016
Status
Member
Last seen
March 14, 2016
-
Mar 14, 2016 at 03:28 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Mar 15, 2016 at 12:55 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Mar 15, 2016 at 12:55 PM
Related:
- How to have my results in different sheets in one workbook?
- Google sheets right to left - Guide
- How to copy data from one excel sheet to another - Guide
- How to open excel sheet in notepad ++ - Guide
- Vba copy data from one workbook to another - Guide
- Vb net add sheet to excel workbook - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Contributor
Last seen
December 27, 2022
555
Mar 15, 2016 at 12:55 PM
Mar 15, 2016 at 12:55 PM
Hi Wilnap,
Checking your "MyResult" data, I found the month to be in column E.
Make sure the month sheets are already there.
Then try the following code:
Best regards,
Trowa
Checking your "MyResult" data, I found the month to be in column E.
Make sure the month sheets are already there.
Then try the following code:
Sub RunMe() Dim x As Integer Sheets("Data").Select x = 2 Do If Month(Cells(x, "E")) = 1 Then Rows(x).Copy _ Sheets("January").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 2 Then Rows(x).Copy _ Sheets("February").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 3 Then Rows(x).Copy _ Sheets("March").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 4 Then Rows(x).Copy _ Sheets("April").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 5 Then Rows(x).Copy _ Sheets("May").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 6 Then Rows(x).Copy _ Sheets("June").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 7 Then Rows(x).Copy _ Sheets("July").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 8 Then Rows(x).Copy _ Sheets("August").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 9 Then Rows(x).Copy _ Sheets("September").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 10 Then Rows(x).Copy _ Sheets("October").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 11 Then Rows(x).Copy _ Sheets("November").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) ElseIf Month(Cells(x, "E")) = 12 Then Rows(x).Copy _ Sheets("December").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) End If x = x + 1 Loop Until Cells(x, "E") = vbNullString End Sub
Best regards,
Trowa