Inserting rows

  • Thread starter Thread starter Tom
  • Start date Start date
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?
 
try this
Sub insertrow()
For i = 2000 To 2 Step -1
Rows(i).Insert
Next
End Sub
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top