Keep Rows Together

taxstar

Board Regular
Joined
Mar 6, 2008
Messages
58
I have a worksheet that currently has about 250 sets of data, each set utilizes 40 rows. I use autofilter to 'hide' irrelevant rows, leaving sets of data with anywhere from 5 to 40 visible rows - and, of course, the sizes of each set of data will change each month.

When I print the report, I need to make sure that there is no page break within a visible set of data, but still want to conserve paper (so the option of one set per page is a non-starter).

There's a "keep lines together" option in Word, but nothing similar that I've been able to find in Excel.

I thought I could build a 'visible row counter' in a non-printing column, but I can't figure out how to use the results to force a page break. Any ideas would be appreciated.


Taxstar
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Set a max amount of lines you want on a page. Then create a 'group' column (or if you can tell in another way, that's fine too). Make a macro to loop through your sheet, and if a group is under that limit, you check the next group. If the sum is too big for the line limit, you only print the first group, otherwise you see if you can tack on a third as well.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

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