Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How can I insert rows alternately

IF I HAVE DATA ON EXCEL SHEET AND I WANT TO INSERT BLANK ROWS BETWEEN ALL THE
SELECTED ROWS, HOW CAN I DO IT.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How can I insert rows alternately

Hi,

Right click your sheet tab, view code and paste the code below in.
make your selection and run the code

Sub Marine()
x = Selection.Rows(1).Row
y = Selection.Rows.Count
For I = y To x + 1 Step -1
Rows(I).Insert
Next I
End Sub


Mike

"nazir" wrote:

IF I HAVE DATA ON EXCEL SHEET AND I WANT TO INSERT BLANK ROWS BETWEEN ALL THE
SELECTED ROWS, HOW CAN I DO IT.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How can I insert rows alternately

It can be done using VBA but why would you want to do this?

You would not be able to sort, filter or otherwise manipulate the data.

If for appearance only, select the rows and double the height.

But if you need the inserted rows, select a bunch of rows 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 Mon, 26 Jan 2009 03:07:04 -0800, nazir
wrote:

IF I HAVE DATA ON EXCEL SHEET AND I WANT TO INSERT BLANK ROWS BETWEEN ALL THE
SELECTED ROWS, HOW CAN I DO IT.


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
Shading multiple rows or, alternately, multiple columns only Lawrence Miller Excel Discussion (Misc queries) 5 December 1st 08 12:05 PM
How to alternately variegate rows lawrencae Excel Discussion (Misc queries) 2 August 27th 08 09:13 PM
How do i insert blank rows between data that is thousands of rows paul.eatwell Excel Discussion (Misc queries) 5 April 14th 08 10:49 PM
Insert rows: Formats & formulas extended to additonal rows Twishlist Excel Worksheet Functions 0 October 22nd 07 04:23 AM
How do i insert of spacer rows between rows in large spreadsheets laurel Excel Discussion (Misc queries) 0 April 24th 06 01:38 PM


All times are GMT +1. The time now is 06:28 AM.

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

About Us

"It's about Microsoft Excel"