Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kwm5321
 
Posts: n/a
Default Inserting blank rows in Excel.

In Excel, is it possible to insert a 'blank' (new) row between each row of
exisitng text?
  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default Inserting blank rows in Excel.

Try the following VBA macro:

Sub InsertRows()
Dim RowNdx As Long
Dim LastRow As Long

LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowNdx = LastRow To 2 Step -1
Rows(RowNdx).Insert
Next RowNdx

End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"kwm5321" wrote in message
...
In Excel, is it possible to insert a 'blank' (new) row between
each row of
exisitng text?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 113
Default Inserting blank rows in Excel.

How do I change it from inserting one row to inserting 11 rows at once?
Thanks.

"Chip Pearson" wrote:

Try the following VBA macro:

Sub InsertRows()
Dim RowNdx As Long
Dim LastRow As Long

LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowNdx = LastRow To 2 Step -1
Rows(RowNdx).Insert
Next RowNdx

End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"kwm5321" wrote in message
...
In Excel, is it possible to insert a 'blank' (new) row between
each row of
exisitng text?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Inserting blank rows in Excel.

Try this one.

Sub InsertRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
r = Cells(Rows.Count, "A").End(xlUp).Row
numRows = 11
For r = r To 1 Step -1
ActiveSheet.Rows(r + 1).Resize(numRows).Insert
Next r
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP


On Thu, 30 Nov 2006 07:58:00 -0800, deeds
wrote:

How do I change it from inserting one row to inserting 11 rows at once?
Thanks.

"Chip Pearson" wrote:

Try the following VBA macro:

Sub InsertRows()
Dim RowNdx As Long
Dim LastRow As Long

LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowNdx = LastRow To 2 Step -1
Rows(RowNdx).Insert
Next RowNdx

End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"kwm5321" wrote in message
...
In Excel, is it possible to insert a 'blank' (new) row between
each row of
exisitng text?





Reply
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Can I delete blank rows from excel without selecting them? rgtest Excel Worksheet Functions 9 February 14th 09 03:12 PM
Not Enough Rows in Excel Joe_G Excel Discussion (Misc queries) 6 September 23rd 05 04:16 PM
Problems inserting rows KathleenK Excel Discussion (Misc queries) 1 August 18th 05 02:13 AM
How do I remove blank rows in Excel? m28leics Excel Discussion (Misc queries) 2 November 29th 04 11:56 PM


All times are GMT +1. The time now is 09:53 AM.

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

About Us

"It's about Microsoft Excel"