Insert Rows between the existing rows

G

Guest

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
 
G

Guest

Ron,

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

Pradeep
 
G

Guest

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
 

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

Top