Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Evad
 
Posts: n/a
Default automatically insert 8 blank rows between each record

I am trying to insert 8 blank rows in between all records in my spreadsheet.
Any suggestions using macros,etc.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default automatically insert 8 blank rows between each record

Hi Evad,
Try this macro (on a backup copy first)...

Public Sub EightRowsTween()
Application.ScreenUpdating = False
Dim iLastRow As Long
Dim rngLastRow As Range
iLastRow = ActiveSheet.UsedRange.Rows.Count
Do While iLastRow 1
Set rngLastRow = Range(Cells(iLastRow, 1), _
Cells(iLastRow + 7, 1))
rngLastRow.EntireRow.Insert
iLastRow = iLastRow - 1
Loop
End Sub

If you ever need to insert a different number of rows between all
records you can change the 7 in the 5th last line eg for 5 rows between
records change the 7 to 4 (always 1 less than the number of inserted
rows)

Ken Johnson

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 delete blank rows from excel without selecting them? rgtest Excel Worksheet Functions 9 February 14th 09 03:12 PM
Insert rows based on specific value bob Excel Worksheet Functions 6 February 29th 08 07:11 PM
program excel worksheet to automatically not print blank rows [email protected] Excel Worksheet Functions 2 July 26th 05 02:11 PM
Activate a macro to insert a row and copy the formuals from the rows above to the blank row oil_driller Excel Discussion (Misc queries) 1 February 11th 05 03:30 PM
Inserting Blank Rows Macro? Michael Saffer Excel Worksheet Functions 2 November 9th 04 06:23 PM


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