Insert a rows automatically

J

jetanddug

In 500 rows of data, is there a formula to insert a row after every row of
data? I don't understand programming so if the response requires this,
please explain as if to a pre school student!
 
D

Dave Peterson

If this is to just make it pretty (double spaced) when you're printing, then
maybe you could just select the entire range and double the rowheight of the
rows.

If you need to add extra rows for a different purpose, you can:

Insert a new column A.
Put 1 in A1
Put 2 in A2
Select A1:A2
and fill down those 500 rows

Select A1:A500
copy that range
Select A501 (the first cell under your data in column A)
Paste the numbers there.

Sort your data by column A (ascending order)

delete column A
 
R

ryguy7272

The trick is to start from the bottom and work up.

Sub Insert_Blank_Rows()

'Select last row in worksheet.
Selection.End(xlDown).Select

Do Until ActiveCell.Row = 1
'Insert blank row.
ActiveCell.EntireRow.Insert shift:=xlDown
'Move up one row.
ActiveCell.Offset(-1, 0).Select
Loop

End Sub

HTH,
Ryan---
 
C

CellShocked

The trick is to start from the bottom and work up.

Sub Insert_Blank_Rows()

'Select last row in worksheet.
Selection.End(xlDown).Select

Do Until ActiveCell.Row = 1
'Insert blank row.
ActiveCell.EntireRow.Insert shift:=xlDown
'Move up one row.
ActiveCell.Offset(-1, 0).Select
Loop

End Sub

HTH,
Ryan---

Find my dynamic named range post and kill that bird too!
 

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

Similar Threads


Top