19 Sep 2018: First created.
26 Sep 2018: Showing one-digit as two-digits added.
Insert page number and total number of pages
Select Page Layout > Print Titles > Header/Footer > Custom Footer:
(By the way, click "Scale with document" and "Align with page margins" to enable the Header and Footer not to encroach into the margins.)
Select icon to insert Page number:
Enter " / ".
Select icon to insert Number of Pages:
Change First page number from "Auto" to "1".
If it is "Auto", the page number of all Worksheets selected to print will run consecutively.
If it is "1", each Worksheet will start at page 1.
However, the total number of pages will be the total of all Worksheets selected printed, not the total number of the respective Worksheet. This may not be desirable.
The next is a solution.
Show total number of pages of a Worksheet
Select Formulas > Name Manager > New.
- Name: NumberOfPages
- Refers to: GETDOCUMENT(50)
Enter in a cell a formula =NumberOfPages
The displayed value will be the total number of pages of the worksheet.
Enter in a cell a formula ="Total " & NumberOfPages & " Pages" (note spaces) will display a meaningful text.
This cannot be used in the Header or Footer.
Show single-digit whole number as two-digit whole number
Press Ctrl-1 > Number > Custom,
Enter "00" against Type. Press OK.
To make the double-digit number actually become a text for other uses, use the TEXT() formula, where "00" represents the Format Type used above, as follows: