Optimized Page Breaks and Adding Headers

FrenchCelt

Board Regular
Joined
May 22, 2018
Messages
210
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?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,214,592
Messages
6,120,433
Members
448,961
Latest member
nzskater

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