Inserting a blank row between rows of data

  • Follow


I have three Excel 2007 lists, around 200 rows each.  I've now found I need 
to insert a blank row after each list entry.  Is there any easy way to do 
this?  I'm pretty decent with Excel, but don't know VBA.  I thought of 
recording a macro, but didn't know how to edit it so that I wouldn't have to 
repeat the same action 200 times for the first list.  Can anyone help?

-- 
Michael Styles
Microsoft Certified Trainer
Microsoft Certified Professional 

0
Reply Michael 1/26/2010 9:30:15 PM

Select a list and run this macro.

Sub InsertALTrows()
'David McRitchie,  misc  2001-06-30
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual
    Dim i As Integer
    For i = Selection(Selection.Count).Row To Selection(1).Row + 1 Step -1
        Rows(i).entirerow.Insert
    Next i
    Application.Calculation = xlCalculationAutomatic       
    Application.ScreenUpdating = True
End Sub


Gord Dibben  MS Excel MVP

On Tue, 26 Jan 2010 16:30:15 -0500, "Michael Styles"
<mlstyles@nospam.nospam> wrote:

>I have three Excel 2007 lists, around 200 rows each.  I've now found I need 
>to insert a blank row after each list entry.  Is there any easy way to do 
>this?  I'm pretty decent with Excel, but don't know VBA.  I thought of 
>recording a macro, but didn't know how to edit it so that I wouldn't have to 
>repeat the same action 200 times for the first list.  Can anyone help?

0
Reply Gord 1/26/2010 10:30:02 PM


Sub insertrows()
dim i as long
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
Rows(i).Insert
Next i
End Sub

-- 
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett@gmail.com
"Michael Styles" <mlstyles@nospam.nospam> wrote in message 
news:9E95B875-4715-42A8-A7DA-0E341A5961C4@microsoft.com...
>I have three Excel 2007 lists, around 200 rows each.  I've now found I need 
>to insert a blank row after each list entry.  Is there any easy way to do 
>this?  I'm pretty decent with Excel, but don't know VBA.  I thought of 
>recording a macro, but didn't know how to edit it so that I wouldn't have 
>to repeat the same action 200 times for the first list.  Can anyone help?
>
> -- 
> Michael Styles
> Microsoft Certified Trainer
> Microsoft Certified Professional 

0
Reply Don 1/26/2010 10:36:15 PM

Thanks loads, Gord.

"Gord Dibben" <gorddibbATshawDOTca> wrote in message 
news:e4rul5dd2fgch0q60slmq409i0v2lab512@4ax.com...
> Select a list and run this macro.
>
> Sub InsertALTrows()
> 'David McRitchie,  misc  2001-06-30
>    Application.ScreenUpdating = False
>    Application.Calculation = xlCalculationManual
>    Dim i As Integer
>    For i = Selection(Selection.Count).Row To Selection(1).Row + 1 Step -1
>        Rows(i).entirerow.Insert
>    Next i
>    Application.Calculation = xlCalculationAutomatic
>    Application.ScreenUpdating = True
> End Sub
>
>
> Gord Dibben  MS Excel MVP
>
> On Tue, 26 Jan 2010 16:30:15 -0500, "Michael Styles"
> <mlstyles@nospam.nospam> wrote:
>
>>I have three Excel 2007 lists, around 200 rows each.  I've now found I 
>>need
>>to insert a blank row after each list entry.  Is there any easy way to do
>>this?  I'm pretty decent with Excel, but don't know VBA.  I thought of
>>recording a macro, but didn't know how to edit it so that I wouldn't have 
>>to
>>repeat the same action 200 times for the first list.  Can anyone help?
> 
0
Reply Michael 1/26/2010 11:51:49 PM

Thanks Don.

"Don Guillett" <dguillett1@gmail.com> wrote in message 
news:eLfV5ftnKHA.5344@TK2MSFTNGP04.phx.gbl...
> Sub insertrows()
> dim i as long
> For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
> Rows(i).Insert
> Next i
> End Sub
>
> -- 
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> dguillett@gmail.com
> "Michael Styles" <mlstyles@nospam.nospam> wrote in message 
> news:9E95B875-4715-42A8-A7DA-0E341A5961C4@microsoft.com...
>>I have three Excel 2007 lists, around 200 rows each.  I've now found I 
>>need to insert a blank row after each list entry.  Is there any easy way 
>>to do this?  I'm pretty decent with Excel, but don't know VBA.  I thought 
>>of recording a macro, but didn't know how to edit it so that I wouldn't 
>>have to repeat the same action 200 times for the first list.  Can anyone 
>>help?
>>
>> -- 
>> Michael Styles
>> Microsoft Certified Trainer
>> Microsoft Certified Professional
> 
0
Reply Michael 1/26/2010 11:52:00 PM

Here's the manual way:
http://excelexperts.com/Excel-Tips-Insert-Alternate-Blank-Lines

Nick
http://excelexperts.com
0
Reply Nick 1/27/2010 9:27:38 AM

Crooks! :-)
From my book, page 111!
Note on the video: Actually, it's ready to sort without changing the cells 
at the bottom to that formula (=cells above +1)
Bob Umlas
Excel MVP

"Nick Vivian" <nick@ExcelExperts.com> wrote in message 
news:1c83ddbd-7f2a-42cc-b4f1-bff96d9ab54c@b9g2000yqd.googlegroups.com...
> Here's the manual way:
> http://excelexperts.com/Excel-Tips-Insert-Alternate-Blank-Lines
>
> Nick
> http://excelexperts.com 

0
Reply Bob 1/27/2010 3:14:04 PM

Thanks.  Great site I now have bookmarked for reference.

"Nick Vivian" <nick@ExcelExperts.com> wrote in message 
news:1c83ddbd-7f2a-42cc-b4f1-bff96d9ab54c@b9g2000yqd.googlegroups.com...
> Here's the manual way:
> http://excelexperts.com/Excel-Tips-Insert-Alternate-Blank-Lines
>
> Nick
> http://excelexperts.com 

0
Reply Michael 1/30/2010 3:46:59 PM

On 1/26/2010 4:30 PM, Michael Styles wrote:
> I have three Excel 2007 lists, around 200 rows each.  I've now found I
> need to insert a blank row after each list entry. Is there any easy way
> to do this? I'm pretty decent with Excel, but don't know VBA. I thought
> of recording a macro, but didn't know how to edit it so that I wouldn't
> have to repeat the same action 200 times for the first list. Can anyone
> help?
>
Free ASAP Utilities has this function.

Eric


0
Reply Zaidy036 1/30/2010 8:28:38 PM

8 Replies
1063 Views

(page loaded in 0.183 seconds)

Similiar Articles:
















7/25/2012 6:42:47 AM


Reply: