Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Pradeep Patel
 
Posts: n/a
Default Insert Rows between the existing rows

Hi,

I have requirements for inserting a blank row in-between existing rows. So I
have let say 300 rows with data and I want to insert a blank row after each
exisitng data row. Is there anything available in Excel? or I have no option
but to manually inserting each row. Please help!!!

Thank you
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Pradeep

Try this macro

Sub test()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim R As Long
Dim rng As Range
numRows = 1
Set rng = ActiveSheet.UsedRange
For R = rng.Rows.Count To 1 Step -1
rng.Rows(R + 1).Resize(numRows).EntireRow.insert
Next R
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Pradeep Patel" wrote in message ...
Hi,

I have requirements for inserting a blank row in-between existing rows. So I
have let say 300 rows with data and I want to insert a blank row after each
exisitng data row. Is there anything available in Excel? or I have no option
but to manually inserting each row. Please help!!!

Thank you



  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Do you really need the blanks rows?

If so, go with Ron's solution.

If just for appearance, select all rows and double the height.


Gord Dibben Excel MVP

On Sat, 8 Oct 2005 04:29:03 -0700, "Pradeep Patel"
wrote:

Hi,

I have requirements for inserting a blank row in-between existing rows. So I
have let say 300 rows with data and I want to insert a blank row after each
exisitng data row. Is there anything available in Excel? or I have no option
but to manually inserting each row. Please help!!!

Thank you


  #4   Report Post  
Pradeep Patel
 
Posts: n/a
Default

Ron,

Yes, your macro works. I appreciate your quick help. Thank you very much.

Pradeep

"Ron de Bruin" wrote:

Hi Pradeep

Try this macro

Sub test()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim R As Long
Dim rng As Range
numRows = 1
Set rng = ActiveSheet.UsedRange
For R = rng.Rows.Count To 1 Step -1
rng.Rows(R + 1).Resize(numRows).EntireRow.insert
Next R
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Pradeep Patel" wrote in message ...
Hi,

I have requirements for inserting a blank row in-between existing rows. So I
have let say 300 rows with data and I want to insert a blank row after each
exisitng data row. Is there anything available in Excel? or I have no option
but to manually inserting each row. Please help!!!

Thank you




  #5   Report Post  
Pradeep Patel
 
Posts: n/a
Default

Thank you Gord, Ron's Macro is working fine.

"Gord Dibben" wrote:

Do you really need the blanks rows?

If so, go with Ron's solution.

If just for appearance, select all rows and double the height.


Gord Dibben Excel MVP

On Sat, 8 Oct 2005 04:29:03 -0700, "Pradeep Patel"
wrote:

Hi,

I have requirements for inserting a blank row in-between existing rows. So I
have let say 300 rows with data and I want to insert a blank row after each
exisitng data row. Is there anything available in Excel? or I have no option
but to manually inserting each row. Please help!!!

Thank you



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
Insert rows based on specific value bob Excel Worksheet Functions 6 February 29th 08 07:11 PM
Can inserted rows automatically include existing worksheet formula tgdavis Excel Discussion (Misc queries) 2 September 20th 05 09:08 PM
Same formula in each cell of column; insert rows w/o copying down tgdavis Excel Discussion (Misc queries) 3 September 14th 05 09:32 PM
Insert rows Mr. G. Excel Worksheet Functions 3 March 31st 05 03:49 AM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


All times are GMT +1. The time now is 04:30 PM.

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"