insert rows

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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)
 
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.
 
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
 
Back
Top