Calculation / Logic Help

VL00kup

New Member
Joined
Nov 13, 2017
Messages
9
Hi Everyone,

I am stumped by the following problem, which initially struck me as seemingly straightforward, so I am hoping to get some additional perspectives. If you could help me think through the logic, that would be most helpful, although I would also welcome any formula help as well.

I prepare a bi-weekly report related to horse racing that compiles the past races of each runner entered that day (let's call each horses profile an entry). One of the most time consuming aspects is manually setting the page breaks to minimize the total # of pages. I believe I have figured out the macro to set the page breaks, but I am struggling to define the logic of where to set them.

Here are the details: I display up to a maximum of 10 races (each entry has 5 rows for basic information, plus 2 rows per race) for each entry, but many entries will have between 0 and 10 previous races, so the number of rows taken up varies. The spreadsheet is set-up to accommodate 10 races per entry, and then I have a filter in place to filter out the rows for blank races. Each entry (that is all of the rows associated with that entry must be on the same page together).

I am trying to dynamically solve for the row number where I can set the page break that will minimize the total number of pages (alternatively, the maximum number of entries that can fit on the page). I can solve for the number of rows for each entry, and know how many total rows can fit on a page, but am struggling to figure out the logic of how to figure out the row numbers to set the page breaks at.

Please let me know if you have any questions and I can help clarify.

Thank you!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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