How do I insert a row between each line of data in Excel?

J

Jacobo

I have a long list of data (2000+ rows) where I need to insert a blank row
between each line. Is there an easy way to do this so it affects the entire
sheet? Thanks
 
G

Gary''s Student

try something like this:

Sub spread_um()
n = Cells(Rows.Count, "A").End(xlUp).Row
For i = n To 1 Step -1
Rows(i).EntireRow.Insert
Next
End Sub
 
G

Gord Dibben

I would not recommend doing this if just for appearance sake.

Set the rows to double height instead.

The blank rows can mess with filtering, copying, sorting.


Gord Dibben MS Excel MVP
 
J

Jacobo

Hi,

Thanks! That worked great. However, I have another question along the same
vein. Is there a way to do the exact same line insertion but have the cells
in the blank lines formatted to type text in red?
Thanks for your help.
 
Top