#1   Report Post  
GOL
 
Posts: n/a
Default Inserting Rows

I have a spreadsheet with about 1,000 rows of customer contacts. I need to
insert 4 blank rows between each record for more information (End up being
5,000 rows total). Is there a way to do this automatically without having to
insert row after row in between each record?
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default Inserting Rows

Hi GOL

Try this one

Sub test()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim R As Long
Dim rng As Range
numRows = 4
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


"GOL" wrote in message ...
I have a spreadsheet with about 1,000 rows of customer contacts. I need to
insert 4 blank rows between each record for more information (End up being
5,000 rows total). Is there a way to do this automatically without having to
insert row after row in between each record?



  #3   Report Post  
GOL
 
Posts: n/a
Default Inserting Rows

THANKS!!!!!!

"Ron de Bruin" wrote:

Hi GOL

Try this one

Sub test()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim R As Long
Dim rng As Range
numRows = 4
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


"GOL" wrote in message ...
I have a spreadsheet with about 1,000 rows of customer contacts. I need to
insert 4 blank rows between each record for more information (End up being
5,000 rows total). Is there a way to do this automatically without having to
insert row after row in between each record?




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
inserting columns within certain rows only crimsonkng Excel Discussion (Misc queries) 4 July 14th 05 05:13 PM
Automatically inserting rows ausdiver99 Excel Worksheet Functions 1 June 2nd 05 02:15 PM
Inserting Rows w/formulas question Buckwheat Excel Worksheet Functions 4 May 7th 05 10:05 PM
inserting rows through external data source [email protected] Excel Discussion (Misc queries) 0 April 5th 05 03:16 AM
Inserting Multiple Rows with Formulas ShineboxNJ Excel Worksheet Functions 2 November 18th 04 02:30 AM


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