How to have my results in different sheets in one workbook?
Closed
wilnap
Posts
1
Registration date
Monday 14 March 2016
Status
Member
Last seen
14 March 2016
-
14 Mar 2016 à 15:28
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 15 Mar 2016 à 12:55
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 15 Mar 2016 à 12:55
Related:
- How to have my results in different sheets in one workbook?
- Google sheets download - Download - Spreadsheets
- How to copy data from one excel sheet to another - Guide
- Google sheets right to left - Guide
- Sheets vba - Guide
- How to copy macro from one workbook to another - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
15 Mar 2016 à 12:55
15 Mar 2016 à 12:55
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