Repeating Rows Challenge

harleyberger

New Member
Joined
May 1, 2003
Messages
37
I've got a worksheet that can be anywhere from 2-6 pages long.

Say, in row 3 I have one cell that describes the succeeding rows, for example, 'Ads Aired 1/1/04 - 1/8/04'. After that row I have 'x' rows of data. This data all fits on the first page.

Further down the page, say in row 35, I have another cell that describes the succeeding rows, for example, 'Ads Aired 1/8/04 - 1/22/04'. After that row I have 'x' rows of data. This data spills over onto a second page.

How do I repeat what's in cell 35 on page 2? Also, the row I need to repeat onto the succeeding page might not always be the same. It all depends on how many rows of data follow it. One time it could be row 35 that needs to be repeated, while another time it could be row 46.

Basically, when my data spills over onto another page, I want to keep the header row that describes what is underneath it.
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
I think I would write a macro to make a new/temporary workbook and extract the data to separate sheets for printing purposes.

You could then use the ActiveSheet.PageSetup.PrintTitleRows = property. A lot of time would be saved if you set up a blank pre-formatted sheet to take the data.
 

harleyberger

New Member
Joined
May 1, 2003
Messages
37
I have no idea how to write macros. If you could offer further help, that would be greatly appreciated.
 

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
you start by setting the macro recorder and doing the job manually.

Come back with a new message 9many of us do not review messages that seem to have answers already) copy/paste code and say what probs you are getting
 

Watch MrExcel Video

Forum statistics

Threads
1,122,822
Messages
5,598,304
Members
414,224
Latest member
Crazy_FC

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
Top