How do I insert alternating blank rows in a list of data?

  • Thread starter Thread starter Guest
  • Start date Start date
From a post of mine very recently
Sub addrows()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
Rows(i).Insert
Next
End Sub
 
From a post of mine very recently
Sub addrows()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
Rows(i).Insert
Next
End Sub
 
Hi Don,

I am not sure where do I insert the below...is there a simple function that
I can write up...if not....how do I copy and paste this.

Thank you!
 
Hi Don,

I am not sure where do I insert the below...is there a simple function that
I can write up...if not....how do I copy and paste this.

Thank you!
 
Do you really need the extra rows?

If for appearance only, select all the rows and double their height through
Format>Row>Height or drag the bottom selected row to a size you like.

OR you could use a macro if you so choose.

Sub InsertRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
numRows = 1
For r = 2500 To 1 Step -1
'change the 2500 to suit your range
ActiveSheet.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Mon, 18 Sep 2006 11:16:02 -0700, curiouscat


Gord Dibben MS Excel MVP
 
Do you really need the extra rows?

If for appearance only, select all the rows and double their height through
Format>Row>Height or drag the bottom selected row to a size you like.

OR you could use a macro if you so choose.

Sub InsertRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
numRows = 1
For r = 2500 To 1 Step -1
'change the 2500 to suit your range
ActiveSheet.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Mon, 18 Sep 2006 11:16:02 -0700, curiouscat


Gord Dibben MS Excel MVP
 
You can do it without a macro.

Here is a suggestion from Bill Kuunders.

Use a new column
put in the top part of that column a number series 1 3 5 7 9 etc till all
lines with existing data have a number
and in the bottom part of that column 2 4 6 8 etc
then select the whole range and sort by this new column
delete the column after.
Greetings from New Zealand
Bill Kuunders


Gord Dibben MS Excel MVP
 
You can do it without a macro.

Here is a suggestion from Bill Kuunders.

Use a new column
put in the top part of that column a number series 1 3 5 7 9 etc till all
lines with existing data have a number
and in the bottom part of that column 2 4 6 8 etc
then select the whole range and sort by this new column
delete the column after.
Greetings from New Zealand
Bill Kuunders


Gord Dibben MS Excel MVP
 
This is a macro. Just copy/paste into a module>change "a" to suit your
column>SAVE> fire from alt f8 or assign to a button/shape.
 
This is a macro. Just copy/paste into a module>change "a" to suit your
column>SAVE> fire from alt f8 or assign to a button/shape.
 
Back
Top