Macro with multiple Headers for multiple pages

amkkhan

Board Regular
Joined
Dec 11, 2021
Messages
75
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Here is the link to file. I the last sheet "Individual Result GT"
I want to get a macro that Generates a pdf or print with following properties
1) Row 1 to Row 7 header for all first 10 pages (7 Rows header)
a) out of very first these 10 pages I want only pages to be printed/converted to pdf that contain data (ignore Blank pages)
b) each page contains 5 Records (Information)
c) You can view Print Preview to view details
2) Row 259 to 266 (8 Rows Header) for page 11 and 12
3) No header for last/13th page

Print Tiles option in Excel is not helping me unfortunately :(
 
Hi amkkhan,

we set the area up to fit on one sheet wide - I doubt changing header and footer margins to have any influence on how wide the sheet is in order to change the row height (which is automatic to fit the requirement of one sheet wide for all data to display). Or shorter: you can have a display of 5 data sets per page as is or change that to something else but that could mean that less than 5 data sets are displayed or that more than one page wide would be needed (I might be wrong here but that is what I remember from that subject).

And regarding the 10 displayed: it may be the number of pages inside the document.

Holger
Hi Holger
Yeah I got your point.
satisfied
Thanks a lot dear :)
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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