Hi all,
I'm very much a beginner when it comes to macros, so would appreciate any and all help you could provide!
I'm looking to create a macro that will copy the data in Sheet 4 (Daily Figures) and paste it into Sheet 5 (Tracking Sheet) for the corresponding date.
I took a look at this question & answer:
http://forum.chandoo.org/threads/copy-data-from-one-worksheet-to-another-using-vlookup-macro.21536/
I tried to alter what Nebu had done for my own purposes, but with no luck.
What I've got is:
What am I doing wrong?
Thanks!
I'm very much a beginner when it comes to macros, so would appreciate any and all help you could provide!
I'm looking to create a macro that will copy the data in Sheet 4 (Daily Figures) and paste it into Sheet 5 (Tracking Sheet) for the corresponding date.
I took a look at this question & answer:
http://forum.chandoo.org/threads/copy-data-from-one-worksheet-to-another-using-vlookup-macro.21536/
I tried to alter what Nebu had done for my own purposes, but with no luck.
What I've got is:
Code:
Sub MoveDailyData()
Application.ScreenUpdating = False
Dim i, j As Date
j = Sheet5.Cells(Rows.Count, "A").End(xlUp).Row
i = Application.WorksheetFunction.Match(Sheet4.Range("A2"), Sheet5.Range("A2:A" & j), 0) + 1
Sheet4.Range("B2:K2").Copy
Sheet5.Range("B" & i).PasteSpecial xlValues
Application.CutCopyMode = False
Application.ScreenUpdating = False
End Sub
What am I doing wrong?
Thanks!