How to Number Pages for a Single Excel Worksheet When Printing to PDF
Question details
The user needs to print or export a specific Excel worksheet to PDF with accurate page numbering in the footer (e.g., Page 1 of 5) without the total count including pages from the rest of the workbook.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Exporting or printing an individual Excel worksheet to PDF while retaining correct page-of-total numbering in the footer.
- Observed behavior
- When printing the entire workbook, the total page count in the footer includes pages from every sheet, ruining the page numbering required for the individual worksheet.
Ensure your worksheet has headers or footers properly configured with the 'Page [Number] of [Total Pages]' elements before accessing the print menu.
Print Only the Active Sheet to PDF
By selecting 'Print Active Sheets' instead of 'Print Entire Workbook,' Excel calculates the total page count based only on the current worksheet.
Excel's print spooler calculates total pages based on what is included in the print job. Limiting the print job to the active sheet prevents the software from counting pages outside of your current selection.
Open your Excel workbook and click on the tab of the specific worksheet you want to print to make it the active sheet.
Navigate to File > Print in the top ribbon menu.
Under the Settings section, click the first dropdown menu and ensure it is set to Print Active Sheets.
Choose Microsoft Print to PDF or Save as PDF from the Printer dropdown menu.
Click the Print button. A dialog will appear asking you to name and save your new PDF document with the correct page numbering.

Export the Worksheet Directly to PDF
Use the built-in Export feature to save the active worksheet as a PDF, bypassing the traditional print spooler settings.
Easily Export Excel Sheets to PDF with Accurate Page Numbers using WPS Office
WPS Spreadsheet offers a built-in, highly intuitive PDF export tool that gives you precise control over page numbering, headers, and footers without dealing with confusing print spooler settings.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office, open your .xlsx workbook, and select the target worksheet tab.
- 2. Access the PDF export tool: Click the Menu button in the top left corner and select Export to PDF.
- 3. Select Active Sheet: In the export dialog box, choose Active sheet under the Export range options.
- 4. Export the file: Click Export to save your PDF. WPS will automatically calculate the correct page numbers for that sheet alone.

Frequently Asked Questions
Why does my Excel footer say 'Page 1 of 50' when my sheet only has 5 pages?
This happens when the print setting is changed to 'Print Entire Workbook'. Excel calculates the total pages across all sheets in the file. Switch your print settings to 'Print Active Sheets' to restrict the count to the current worksheet.
Can I select multiple specific sheets and have their page numbers calculated together?
Yes. Hold down the Ctrl key (or Cmd on Mac) and click the tabs of the sheets you want to include. Then, select 'Print Active Sheets'. The footer will calculate the total page count for only those combined selected sheets.
How do I add 'Page X of Y' to my worksheet before printing?
Go to the Insert tab, select Header & Footer, and click on the Footer section. You can choose the 'Page 1 of ?' preset from the navigation ribbon, or manually insert the 'Page Number' and 'Number of Pages' elements.




