insert a blank row after every row


Posted by mitch on August 13, 2001 3:00 PM

I am getting real tired of "alt-i r" enter enter "alt-1 r" etc... How can I add a black row after after every existing row. For example this...
1
2
3
4

Would then look like this...
1

2

3

4

and so on.
Thanks,
Mitch

Posted by faster on August 13, 2001 3:05 PM


Try This:

Sub InsertBlank()
Range("A1").Select

Do While Selection <> ""
Selection.Offset(1, 0).Select
Selection.EntireRow.Insert
Selection.Offset(1, 0).Select
Loop

Range("A1").Select

End Sub



Posted by Russell Hauf on August 13, 2001 3:10 PM

Here's a quick macro that should work:

Sub InsertRows()

Dim intLastRow as Integer
Dim intRow as Integer

intLastRow = InputBox("What is the last row of your section?")

For intRow = intLastRow to 2 Step - 1

Rows(intRow).Select
Selection.Insert Shift:=xlDown

Next intRow

End Sub


Hope this helps,

Russell