Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows
I need a macro to insert two rows at every 6th row.
Thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows
Starting at which row? You can tweak something like this to your
needs. Sub foo() Dim n As Long n = 6 botrow = Cells(Rows.Count, 1).End(xlUp).Row Do Until n = botrow Range("A1").Offset(n, 0).EntireRow.Insert n = n + 6 botrow = botrow + 1 Loop End Sub Scotty wrote: I need a macro to insert two rows at every 6th row. Thank you. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting rows
If I wanted to insert 5 rows for every 1 row. How would I change the below
macro? Thanks "JW" wrote: Starting at which row? You can tweak something like this to your needs. Sub foo() Dim n As Long n = 6 botrow = Cells(Rows.Count, 1).End(xlUp).Row Do Until n = botrow Range("A1").Offset(n, 0).EntireRow.Insert n = n + 6 botrow = botrow + 1 Loop End Sub Scotty wrote: I need a macro to insert two rows at every 6th row. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
inserting rows inbetween rows of data ? | Excel Discussion (Misc queries) | |||
Copying & Inserting Rows w/o Affecting other Rows Etc. | Excel Worksheet Functions | |||
Inserting Blank rows after every row upto 2500 rows | Excel Worksheet Functions | |||
Why is inserting rows throwing off my hidden rows | Excel Programming | |||
Inserting multiple rows in excel with data in consecutive rows | Excel Programming |