Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Med
 
Posts: n/a
Default How to quickly insert a blank row every 5 rows?

I have a worksheet that has about 2000 rows. I want to insert a blank
row every five rows. Doing the same steps 400 times is time consuming
and no fun. And I have to do this often. Is there a quicker way to
do this?
  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default

You can use a VBA macro like the following:


Sub AAA()
Dim LastRow As Long
Dim RowNdx As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For RowNdx = 6 To LastRow Step 6
Rows(RowNdx).Insert
Next RowNdx
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Med" wrote in message
...
I have a worksheet that has about 2000 rows. I want to insert a
blank
row every five rows. Doing the same steps 400 times is time
consuming
and no fun. And I have to do this often. Is there a quicker
way to
do this?



  #3   Report Post  
Herbert Seidenberg
 
Posts: n/a
Default

Or without VBA:
Insert an adjacent helper column,
enter the label Seq on top and then
sequential numbers. Name numbers Seq.
Type the label Alpha into a cell.
Enter this formula into the cell below Alpha:
=MOD(Seq,4)=0 (FALSE response is OK)
Select both cells and name them Criteria.
Use Insert Name Define.
Select your data range, including Seq and
all top labels, and name it Database.
Select the first empty cell at the bottom of
Database and name it Extract.
Data Filter Advanced Filter
Copy to another location
Type Database, Criteria and Extract into the
three range boxes respectively. Click OK.
Format the appended data with a unique format,
say red font.
Select Database plus the appended data
and sort it by Seq.
Edit Replace Format Choose Format from Cell
Click on a red cell Replace All

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, keep a formula? tb Excel Worksheet Functions 1 April 23rd 05 03:41 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
insert rows Arun Excel Worksheet Functions 3 December 11th 04 06:14 PM
Blank Rows Acesmith Excel Discussion (Misc queries) 1 November 30th 04 09:23 PM
How do I remove blank rows in Excel? m28leics Excel Discussion (Misc queries) 2 November 29th 04 11:56 PM


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