Optimized Page Breaks and Adding Headers

FrenchCelt

Board Regular
Joined
May 22, 2018
Messages
135
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a formatting macro for daily reports that puts everything into a format that is easy to read, but I have one last step before I can consider it complete. I'd like the macro to optimize the page breaks to fit the most data onto each page without cutting off a user's data, so I can keep it all together, and then add the same header from the top of the entire report at the top of each page so everyone can understand what the data means without having to flip to page 1 (the report is printed and posted for employees to see how they did the previous day). I've been doing this last part manually, and that can be very tedious when the report will hit 40+ pages.

This is an example of what the data looks like before I manipulate page breaks and headers:

1610214166034.png
1610214243572.png

1610214301059.png


And this is what it looks like after I make my adjustments:

1610214402763.png

1610214453741.png

1610214486933.png


Does anyone know of a way to automate the page breaks, having them go down as far as possible and setting below the Total row for the bottommost user, and copying the header from Row 5 and pasting into the blank row above the user on each successive page?
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Watch MrExcel Video

Forum statistics

Threads
1,122,530
Messages
5,596,700
Members
414,088
Latest member
rodriboraun

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