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 Moderator Last seen January 16, 2023 - Mar 15, 2016 at 12:55 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - Mar 15, 2016 at 12:55 PM
Related:
- How to have my results in different sheets in one workbook?
- How to copy data from one sheet to another in excel automatically - Guide
- Macro to copy data from one workbook to another based on criteria ✓ - Excel Forum
- How to screenshot excel sheet - Guide
- How to copy data from one excel workbook to another using macro - Guide
- How to make in little alchemy cheat sheet - Guide
1 reply
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
544
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