Insert blank rows

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.
 
M

Mike H

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
 
G

Gord Dibben

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
 

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