Insert rows everyother row

R

Ron de Bruin

Try this example Mathew

Sub test()
Application.ScreenUpdating = False
Dim R As Long
Dim rng As Range
Set rng = ActiveSheet.UsedRange
For R = rng.Rows.Count To 1 Step -1
rng.Rows(R + 1).Resize(1).EntireRow.insert
Next R
Application.ScreenUpdating = True
End Sub
 
G

Gord Dibben

Do you really need the inserted rows?

If just for appearance, select the rows and double the height.

If really need the rows, see Ron's posting.


Gord Dibben MS Excel MVP
 
M

Mikeopolo

OK, let's say you have 5 rows in a block.

Insert a column on the left, and create a series 1,3,5,7 and 9. Then i
the cells below that, create a series 2,4,6 and 8 (insert blank row
first if you have to).

Then select the whole matrix and sort on the new column. The blank row
will end up between your original rows.

Regards
Mik
 
R

raypayette

Use this macro:
Sub Macro1()
For i = 2 To 10 Step 2
Range("A" & i).Select
Selection.EntireRow.Insert
Next
End Su
 
Top