Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Inserting blank rows in Excel.
In Excel, is it possible to insert a 'blank' (new) row between each row of
exisitng text? |
#2
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
Can I delete blank rows from excel without selecting them? | Excel Worksheet Functions | |||
Not Enough Rows in Excel | Excel Discussion (Misc queries) | |||
Problems inserting rows | Excel Discussion (Misc queries) | |||
How do I remove blank rows in Excel? | Excel Discussion (Misc queries) |