Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is it possible to insert a row in every other line all at ounce in an excel
document? In otherwords I have an Excel document that I have to insert a new row at every other line and would like a way to do it all in one shot instead of manually right-clicking each line and inserting a row. If possible how can this be done Thanks in advance. Greg |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can do it with a VBA macro. Select the cells in which you
want to insert the blank lines and run the following code: Sub AAA() Dim Ndx As Long For Ndx = Selection.Cells(1, 1).Row + 1 To _ Selection.Cells(1, 1).Row + (Selection.Rows.Count * 2) Step 2 Rows(Ndx).Insert Next Ndx End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Greg" wrote in message ... Is it possible to insert a row in every other line all at ounce in an excel document? In otherwords I have an Excel document that I have to insert a new row at every other line and would like a way to do it all in one shot instead of manually right-clicking each line and inserting a row. If possible how can this be done Thanks in advance. Greg |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
something like
for i=cells(rows.count,"a").end(xlup).row to 2 step -2 rows(i).insert next i -- Don Guillett SalesAid Software "Greg" wrote in message ... Is it possible to insert a row in every other line all at ounce in an excel document? In otherwords I have an Excel document that I have to insert a new row at every other line and would like a way to do it all in one shot instead of manually right-clicking each line and inserting a row. If possible how can this be done Thanks in advance. Greg |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If the inserted rows are just for readability/appearance, you can select a whack
of rows and double their height at one go. Otherwise, go with Chip's code. Gord Dibben MS Excel MVP On Wed, 28 Jun 2006 07:04:02 -0700, Greg wrote: Is it possible to insert a row in every other line all at ounce in an excel document? In otherwords I have an Excel document that I have to insert a new row at every other line and would like a way to do it all in one shot instead of manually right-clicking each line and inserting a row. If possible how can this be done Thanks in advance. Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can i wrap rows to form multiple rows per row to fit on 1 sheet? | Excel Discussion (Misc queries) | |||
Inserting rows in multiple workbooks | Excel Discussion (Misc queries) | |||
inserting rows through external data source | Excel Discussion (Misc queries) | |||
Convert multiple columns to rows | Excel Worksheet Functions | |||
Multiple rows of data on a single axis (charting) | Charts and Charting in Excel |