Insert Rows between the existing rows

P

Pradeep Patel

Hi,

I have requirements for inserting a blank row in-between existing rows. So I
have let say 300 rows with data and I want to insert a blank row after each
exisitng data row. Is there anything available in Excel? or I have no option
but to manually inserting each row. Please help!!!

Thank you
 
R

Ron de Bruin

Hi Pradeep

Try this macro

Sub test()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim R As Long
Dim rng As Range
numRows = 1
Set rng = ActiveSheet.UsedRange
For R = rng.Rows.Count To 1 Step -1
rng.Rows(R + 1).Resize(numRows).EntireRow.insert
Next R
Application.ScreenUpdating = True
End Sub
 
G

Gord Dibben

Do you really need the blanks rows?

If so, go with Ron's solution.

If just for appearance, select all rows and double the height.


Gord Dibben Excel MVP
 
P

Pradeep Patel

Ron,

Yes, your macro works. I appreciate your quick help. Thank you very much.

Pradeep
 
P

Pradeep Patel

Thank you Gord, Ron's Macro is working fine.

Gord Dibben said:
Do you really need the blanks rows?

If so, go with Ron's solution.

If just for appearance, select all rows and double the height.


Gord Dibben Excel MVP
 
Top