insert rows

G

Guest

a workshhet with 30 column 100 rows with data. I would like to insert a
blank row after each row automatically. please help
 
B

Bob Phillips

Application.Screenupdating = False
For i = 100 to 1 Step -1
cells(i,"A").entirerow.insert
Next i
Application.Screenupdating = True
--

HTH

RP
(remove nothere from the email address if mailing direct)
 
R

R.VENKATARAMAN

suppose your data is in column A from A1 down
at the cell below the last cell type the string(this is most important
otherwise the programme will go on and on)

stop

now use this vba programme

Public Sub test()
Range("a1").Activate
line1:
ActiveCell.Offset(1, 0).Activate
If ActiveCell = "stop" Then Exit Sub
ActiveCell.EntireRow.Insert
ActiveCell.Offset(1, 0).Activate
GoTo line1
End Sub

do u get what you want.
 
G

Gord Dibben

Arun

There have been posted a couple of VBA macros to do what you want.

I'm just wondering why you need the blank rows.

If for appearance only, you could just select the 100 rows and double the
height.

If blank rows are to be used for data input, ignore this suggestion.

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