Inserting rows

T

Tom

I have a spread sheet with about 2000 rows and I would like
to insert a blank row between each entry. Is there a way to
do this all at once rather than doing it one line at a time?
 
D

Don Guillett

try this
Sub insertrow()
For i = 2000 To 2 Step -1
Rows(i).Insert
Next
End Sub
 
D

Dave Peterson

maybe you could just select those columns and double the rowheight (if they were
all the same height).

Then it would look double spaced, but sorting/pivottables/charts/autofilters
would be easier.
 
G

Gord Dibben

Tom

A macro from Davis McRitchie will insert a blank row between each.

But, is this just for appearance sake or do you need the blank row?

For appearance, select all the rows and double the height.

Macro follows.....

Sub InsertALTrows()
'David McRitchie, misc 2001-06-30
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim i As Integer
For i = Selection(Selection.Count).Row To Selection(1).Row + 1 Step -1
Rows(i).EntireRow.Insert
Next i
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub

Gord Dibben Excel MVP
 
Top