Excel macro help for a noob

Closed
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

I need to create a macro that copies cells A1:R1 from "Workbook 1, Sheet1" to cells C24:T24 in "Workbook 2, Sheet 3". Weekly "Workbook 1" will be changing, so the next week A1:R1 "Workbook 1, Sheet 1" needs to copy to C25:T25 "Workbook 2, Sheet 3" and so on.

Would anyone be able to point me in the right direction?

Thanks a TON in advance!!!!!!!

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
you need to locate the last used cell before you paste


lastrow = cells(rows.count, "A").end(xlup).row

gives you last used row in column A of the active sheet
0