Need to Add a Blank Row between every Row in a >400 Row Spreadsheet

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi, is there any way I can automate the process of of adding a blank row
between rows in a >400 row Excel 2003 spredsheet.?

Thanks,

Mike
 
I think that this is usually a bad idea. It can mess up filters, graphs,
pivottables, ...

If you want to make it look double spaced, then increase the rowheight.

But you can do it a few ways.

One way (manual):
Insert a new helper column
put =row() in the top cell of that new column and drag down (>400 rows)
Then convert those formulas to values (edit|copy, edit|paste special|values)

Then copy those numbers to the rows directly beneath the >400 rows.

Now select the whole range (row 1 to > row 800).

Sort your data by that column.
Delete the helper column.

Another way is to use a macro.

This picks out a column that has data in it on the last row -- I used column A.

Option Explicit
Sub testme()
Dim LastRow As Long
Dim FirstRow As Long
Dim iRow As Long

With ActiveSheet
FirstRow = 2
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

For iRow = LastRow To FirstRow Step -1
'to increase the rowheight to twice the height
'.Rows(iRow).RowHeight = 2 * .Rows(iRow).RowHeight
'to insert a new row
.Rows(iRow).Insert
Next iRow
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Dave Peterson said:
I think that this is usually a bad idea. It can mess up filters, graphs,
pivottables, ...

If you want to make it look double spaced, then increase the rowheight.

But you can do it a few ways.


This is an inventory spreadsheet w/ no graphs, tables or anything else.
I'm going to do an eyball inventory and want to write changes in the blank
rows then when I return to
my office I'm add the data to the spreadsheet. I'll try your suggestions.

Thanks

Mike
 
Back
Top