Anyone knows a macro that can copy the specific rows and columns for a specific month and week.
I would like for the macro to copy the specific data and match the column headings in sheet2.
Help!!! im stuck.
I'm using :
Sub CopyRowToEmerging()
Dim LastRowMain, LastRowEmerging As Long
Dim i As Long
Application.ScreenUpdating = False
LastRowMain = Worksheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row
With Worksheets("Sheet1")
For i = 1 To LastRowMain Step 1
If Cells(i, "A").Value = Range("o1") Then
LastRow = Worksheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row
Rows(i).Copy Worksheets("Sheet2").Range("A" & LastRow + 1)
End If
Next i
End With
Application.ScreenUpdating = True
End Sub
but it copies everything and I only need the specific columns that is labelled in sheet 2. I've also attached a sheet to show.
Bookmarks