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!
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!