Inserting Rows

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Hi,

I have 500+ rows of data that I would like to insert a
blank row in between each row. Is there a globabl way of
doing it rather than having to click on each row one at a
time and then selecting 'insert row'?

Thanks

Ben
 
Ben

The macro that Frank referred you to is for insertinga row(s) between any rows
in Column A that do not have the same data as the row above.

Only if all data is unique is this macro useful for just inserting a single
alternating row.

You may be better off with a David McRitchie Macro which inserts an
alternating blank row regardless of content.

Sub InsertALTrows()
'David McRitchie, misc 2001-06-30
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual 'pre XL97 xlManual
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 'pre XL97 xlAutomatic
Application.ScreenUpdating = True
End Sub

Gord Dibben Excel MVP
 
Gord,

Thanks! I was lucky that each row had different data but
I will still save this gem for future use.

Thanks.

ben
-----Original Message-----
Ben

The macro that Frank referred you to is for insertinga row(s) between any rows
in Column A that do not have the same data as the row above.

Only if all data is unique is this macro useful for just inserting a single
alternating row.

You may be better off with a David McRitchie Macro which inserts an
alternating blank row regardless of content.

Sub InsertALTrows()
'David McRitchie, misc 2001-06-30
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual 'pre XL97 xlManual
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 'pre XL97 xlAutomatic
 
Thanks for the feedback.

Gord

Gord,

Thanks! I was lucky that each row had different data but
I will still save this gem for future use.

Thanks.

ben
xlCalculationAutomatic 'pre XL97 xlAutomatic
 
Back
Top