Excel macro help for a noob

Closed
CJ - Aug 15, 2010 at 09:30 PM
rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Aug 17, 2010 at 11:43 PM
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

rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 768
Aug 17, 2010 at 11:43 PM
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