Excel Macro to insert rows in a list

M

MartyCole

I'm sure this has been asked in the past but I couldn't find it in th
list of replies.

I need a macro to skip down a number (usually 5. sometimes 3 i
different spreadsheets) then insert a blank row. it needs to continu
until it reaches the end of the list (anywhere from 100 to 300
lines).

I could do this in Lotus years ago but I'm lost in Excel...

Thanks for any help you can provid
 
B

Bob Phillips

Dim iLastRow As Long
Dim i As Long
Const nRows As Long = 5

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = (iLastRow \ nRows) * nRows + 1 To 1 Step -nRows
Rows(i).Insert
Next i


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Top