View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CellShocked CellShocked is offline
external usenet poster
 
Posts: 277
Default Insert a rows automatically

On Fri, 30 Oct 2009 08:47:02 -0700, ryguy7272
wrote:

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!