Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Greg
 
Posts: n/a
Default inserting multiple rows in one shot?

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   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default inserting multiple rows in one shot?

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



  #4   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default inserting multiple rows in one shot?

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
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
can i wrap rows to form multiple rows per row to fit on 1 sheet? Dave Excel Discussion (Misc queries) 2 October 9th 12 04:53 PM
Inserting rows in multiple workbooks 50pingviner Excel Discussion (Misc queries) 2 December 21st 05 04:15 PM
inserting rows through external data source [email protected] Excel Discussion (Misc queries) 0 April 5th 05 03:16 AM
Convert multiple columns to rows Lois Lane Excel Worksheet Functions 8 January 10th 05 01:47 AM
Multiple rows of data on a single axis (charting) ramseysgirl Charts and Charting in Excel 8 December 29th 04 07:00 PM


All times are GMT +1. The time now is 10:19 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"