![]() |
how to write visual basic macros
I need to copy a range (c1:n1) every 11th row in a long spreadsheet. The
data is numerical and will be used in a formula that will reference this data. The rows to paste into start with C11:N11 and run through C787:N787. I also need to a macro to copy a formula in the same manner and size. HELP? |
how to write visual basic macros
for each cell in Range("C11:C787")
if cell.row mod 11 = 0 then range("C1:N1").copy destination:=cell end if Next that would do 11, 22, 33, 44, 55, etc if you want 11, 21, 31, 41, 51, change to for each cell in Range("C11:C787") if (cell.row-1) mod 10 = 0 then range("C1:N1").copy destination:=cell end if Next -- Regards, Tom Ogilvy "Ken Michaels" <Ken wrote in message ... I need to copy a range (c1:n1) every 11th row in a long spreadsheet. The data is numerical and will be used in a formula that will reference this data. The rows to paste into start with C11:N11 and run through C787:N787. I also need to a macro to copy a formula in the same manner and size. HELP? |
All times are GMT +1. The time now is 02:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com