Pete, here is some code that will do it,
Sub testme()
'will add a row after every 4th row
'Original code by: Dave Peterson
Dim iCtr As Long
Dim LastRow As Long
Dim myRng As Range
With ActiveSheet
LastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row
Set myRng = Nothing
For iCtr = 5 To LastRow Step 4
If myRng Is Nothing Then
Set myRng = .Cells(iCtr, "A")
Else
Set myRng = Union(.Cells(iCtr, "A"), myRng)
End If
Next iCtr
End With
If myRng Is Nothing Then
'do nothing
Else
myRng.EntireRow.Insert
End If
End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
"Little pete" wrote in message
...
wanting to auto insert a blank line every 'x' number of lines down the
s/s.
for the example 'x' can be every 4th line
cheers pete
|