Skip to main content
5-Regular Member
May 5, 2026
Question

Customized page numbering in Header/Footer

  • May 5, 2026
  • 2 replies
  • 43 views

Thanks for the new option to customize the range of page numbering in Header/Footer, very useful when assembly a bigger document with several worksheets.

Question 1: is it possible to link the page numbering to a running variable that keeps track of the overall numbering?
I mean, first worksheet have 5 pages, then second worksheet starts on page number 6 until number of pages, then third worksheet starts on next page number after worksheet 2, etc.

Question 2: does it exists a variable which provides the total number of pages of the current worksheet?

2 replies

amcgough
14-Alexandrite
May 5, 2026

Hey Miguel,

You’re right, we currently don’t have a method in-worksheet to track number of pages or connect number of pages to a variable - though I can see the use they would be, and it would make the new custom page numbering feature easier to use. If we did have one, collapsible areas may complicate matters - you could have a one-page document, with the page number variable reporting 1, with 10 collapsed areas in it, which, when opened, would make the worksheet 100 pages long. Do you feel the page number variable should reflect the current number of pages - like the page number field in the footer reflects? Or the total, no matter the state of areas? Or maybe even both, in some way?

Many thanks,

Andy.

Miguel_F5-Regular MemberAuthor
5-Regular Member
May 6, 2026

Thanks Andrew

I would say most needed and effective is the current number of pages, like the page number field in footer, at least for us.  I agree that number of pages depends on how many collapsible areas are open or closed, and this is exactly our point, depending on input data, calculations might be different, showing/hiding different areas as needed and therefore affecting real amount of pages in the printed document.

I understand the difficulty of ‘transferring’ variables and content from header/footer areas to worksheet and vice versa.  Eventually a nice and easy option is to define something like the customized document attributes in Excel, they would allow manipulation/use everywhere, not mixing itself in the mathematical calculations of the worksheet , some fields available everywhere which maintain its content unless explicitly modified for example with some values read from Excel, or even from another Mathcad worksheet.