LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I automatically insert rows colwyn Excel Discussion (Misc queries) 13 September 11th 08 09:16 PM
Automatically insert rows with formula susy Excel Worksheet Functions 10 November 21st 07 01:03 PM
Automatically Insert New Rows Eric Excel Discussion (Misc queries) 0 June 12th 07 10:54 PM
Automatically insert/delete rows to be x apart Mr_Flibble Excel Discussion (Misc queries) 5 February 17th 06 04:04 AM
how do you have rows automatically insert in excel? Shelvonne Excel Worksheet Functions 0 November 10th 05 12:37 AM


All times are GMT +1. The time now is 03:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"