PC Review


Reply
Thread Tools Rate Thread

Auto insert blank rows

 
 
=?Utf-8?B?Q29uc3RhbnRseSBBbWF6ZWQ=?=
Guest
Posts: n/a
 
      14th Mar 2007
Hi

I have to repetitively handle a file with a list of reference numbers in
column A. The number of rows varies each time the task is carried out. The
rows are a continuous list. It is necessary to insert a blank line between
each row containing an entry. Could anyone provide a macro which establishes
how many rows there are in the list and then automatically inserts a blank
row between each entry?

Thank you for any assistance.

G
 
Reply With Quote
 
 
 
 
merjet
Guest
Posts: n/a
 
      14th Mar 2007
Sub InsertRows_()
Dim iEnd As Long
Dim iRow As Long

iEnd = Range("A1").CurrentRegion.Rows.Count
For iRow = iEnd To 1 Step -1
Rows(iRow + 1).Insert xlShiftDown
Next iRow
End Sub

Merjet


 
Reply With Quote
 
=?Utf-8?B?Q29uc3RhbnRseSBBbWF6ZWQ=?=
Guest
Posts: n/a
 
      14th Mar 2007
Hi Merjet

That appears to work fine. Thanks very much for your help

"merjet" wrote:

> Sub InsertRows_()
> Dim iEnd As Long
> Dim iRow As Long
>
> iEnd = Range("A1").CurrentRegion.Rows.Count
> For iRow = iEnd To 1 Step -1
> Rows(iRow + 1).Insert xlShiftDown
> Next iRow
> End Sub
>
> Merjet
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert blank rows Deb Microsoft Excel Misc 2 19th Dec 2009 08:14 PM
Text to Rows and then Insert Blank Rows conorfinnegan@gmail.com Microsoft Excel Misc 1 20th Dec 2008 04:23 PM
How do i insert blank rows between data that is thousands of rows paul.eatwell Microsoft Excel Misc 5 14th Apr 2008 10:49 PM
insert blank rows sillyscorpio Microsoft Excel Misc 2 7th Dec 2007 03:23 PM
How do I insert blank rows between rows in completed worksheet? =?Utf-8?B?YmJsdWUxOTc4?= Microsoft Excel Misc 1 26th Oct 2006 07:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:38 PM.