inserting rows

S

Stacie

I need to know if there is a way to insert one row in between each line on a
worksheet without having to click "insert" then "row" everytime?
 
N

Nick Hodge

Stacie

How many are you looking to insert?

If it is just say 20, hold the ctrl key down while selecting every other row
and then taking the menu option you outline, it will insert a row at each
selection. (Depending on your data you may need to repeat)

If it's hundreds we could use code

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
www.nickhodge.co.uk
 
B

bj

a simple way is to use a helper column.
fill the column column with 1 to n (N = number of rows with data)
below this enter =A1+.5
copy down to row 2N
selet all and sort by the helper column.
delete the helper column
 
G

Gary''s Student

Try:

Sub stacie()
Set r = ActiveSheet.UsedRange
last = r.Rows.Count + r.Row - 1
For i = last To 1 Step -1
Rows(i).Insert Shift:=xlDown
Next
End Sub
 
Top