Insert blank rows

  • Thread starter Thread starter Deb
  • Start date Start date
D

Deb

Rather than using the control button to select every other row, which can be
very time consuming when you have more than 100 rows, I am trying to figure
out how to auto-insert blank rows between pre-populated rows of information.
 
Deb,

Try this macro. ALT+F11 to open VB editor. Right click 'ThisWorkbook' and
insert module and paste the code in on the right . Change the sheet name to
your sheet and run the code

Sub insert_rows()
Dim ws As Worksheet, x as long
Set ws = Sheets("Sheet3")
lastrow = ws.Cells(Cells.Rows.Count, "A").End(xlUp).Row
For x = lastrow To 2 Step -1
ws.Rows(x).EntireRow.Insert
Next
End Sub


Mike
 
Blank rows within your data range will give you problems with copy, paste,
sort, filter and probably other functions.

Do you really need those blank rows?

If just for appearance, doubling the row heights may help you.


Gord Dibben MS Excel MVP
 
Back
Top