Insert the header row proceeded by 4 blank rows at each change in a column value

Rackette

New Member
Joined
Jul 2, 2019
Messages
37
Good morning :)
I've been looking all over for a macro that does what I need, but I have been unable to find one, so I will appreciate ANY help someone can offer.

I have a report that has about 150 rows and 9 columns. One of the columns is "Start Time". Every time there is a change in "Start Time", I need to insert 4 blank rows PLUS a 5th row that is an exact copy of the header row (font size, font, fill color....everything needs to be the same as row 1). The total number of rows is dynamic and the number of rows in each "Start Time" grouping is dynamic. The first two columns will always be blank except where the header row has been inserted. The first two columns are for manually entering a check mark when the person goes out and then another when they are back in.

This is what I'd start with:

OUTINNameStart TimeEnd TimeLocation
Ashley06000645a
Christine06000645a
Christopher06150700a
Lanny06150700a
Mark06150700a
Mary06450730a
Neil07000745a
Pat07000745a
Paul07000745a
Rennie07150800b
Rob07300815a
Robert07300815a
Roger07300815a

<tbody>
</tbody>
I need the macro to change it to the following pattern.

OutInNameStart TimeEnd TimeLocation
Ashley06000645a
Christine06000645a
OutInNameStart TimeEnd TimeLocation
Christopher06150700a
Lanny06150700a
Mark06150700a
OutInNameStart TimeEnd TimeLocation
Mary06450730a
OutInNameStart TimeEnd TimeLocation
Neil07000745a
Pat07000745a
Paul07000745a

<tbody>
</tbody>
 
Perfect. Thank you so much. That was easy and I should have figured it out myself. I looked at this for awhile and just didn't see the forest for the trees.
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top