Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
I need to do the following inside an excel macro. I will insert some
information on row 2 of a spreadsheet. I need that row copied and pasted on all even rows of that spreadsheet until the end of the recordset, starting on row 4. Can anyone help with the code? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
Anyone? Please? :)
"yankeefan" wrote in message m... I need to do the following inside an excel macro. I will insert some information on row 2 of a spreadsheet. I need that row copied and pasted on all even rows of that spreadsheet until the end of the recordset, starting on row 4. Can anyone help with the code? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
I don't know how you determine the lastrow or what you mean by record set, but
maybe this will help: Option Explicit Sub testme01() Dim myRow As Range Dim iRow As Long With ActiveSheet Set myRow = .Rows(2) For iRow = 4 To 2000 Step 2 myRow.Copy _ Destination:=.Rows(iRow) Next iRow End With End Sub yankeefan wrote: I need to do the following inside an excel macro. I will insert some information on row 2 of a spreadsheet. I need that row copied and pasted on all even rows of that spreadsheet until the end of the recordset, starting on row 4. Can anyone help with the code? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet | Excel Programming |