Auto-Insertion of Rows

  • Thread starter Thread starter donc
  • Start date Start date
D

donc

I would like to double-space an entire spreadsheet.

I made a macro to do several rows, but since I need several
hundred blanks rows this gets real clumsy (to specify each row).
Does anyone have a macro that will insert a blank row before every row?

Thanks

donc
 
Hi
try
Sub insert_rows()
Dim lastrow As Long
Dim row_index As Long
application.screenupdating=false
lastrow = ActiveSheet.Cells(Rows.count, 1).End(xlUp).row
For row_index = lastrow - 1 To 1 Step -1
rows(row_index + 1).insert (xlShiftDown)
Next
application.screenupdating=true
End Sub
 
Frank said:
Hi
try
Sub insert_rows()
Dim lastrow As Long
Dim row_index As Long
application.screenupdating=false
lastrow = ActiveSheet.Cells(Rows.count, 1).End(xlUp).row
For row_index = lastrow - 1 To 1 Step -1
rows(row_index + 1).insert (xlShiftDown)
Next
application.screenupdating=true
End Sub

That works great, Frank. You are REALLY good.

donc
 
Back
Top