Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Imported Visual Basic Module - Save Macros for use in Excel | Excel Discussion (Misc queries) | |||
Visual Basic Macros | Excel Discussion (Misc queries) | |||
Visual Basic Macros, relative position | Charts and Charting in Excel | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) | |||
creating an exe file with visual basic (installation file for Macros and Userforms) | Excel Programming |