View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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?