logo
search
Printing Problems

How to Number Pages for a Single Excel Worksheet When Printing to PDF

Amos GikundaAmos Gikunda Oct 9, 2026 869 views

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.

How to Number Pages for One Excel Worksheet When Printing to PDF
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.
Before you start

Ensure your worksheet has headers or footers properly configured with the 'Page [Number] of [Total Pages]' elements before accessing the print menu.

Solution 1Recommended

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.

1
Select the target worksheet

Open your Excel workbook and click on the tab of the specific worksheet you want to print to make it the active sheet.

2
Open the Print menu

Navigate to File > Print in the top ribbon menu.

3
Change print settings

Under the Settings section, click the first dropdown menu and ensure it is set to Print Active Sheets.

4
Select PDF printer

Choose Microsoft Print to PDF or Save as PDF from the Printer dropdown menu.

5
Print and save

Click the Print button. A dialog will appear asking you to name and save your new PDF document with the correct page numbering.

Print Only the Active Sheet to PDF
Dynamic Sheet Updates: This method forces Excel to count only the pages within the selected sheet. Even if your sheet is updated frequently and its page count varies, the footer will always reflect the accurate total for that specific sheet.
Seamless PDF Export in WPS Office

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. 1. Open your file in WPS Spreadsheet: Launch WPS Office, open your .xlsx workbook, and select the target worksheet tab.
  2. 2. Access the PDF export tool: Click the Menu button in the top left corner and select Export to PDF.
  3. 3. Select Active Sheet: In the export dialog box, choose Active sheet under the Export range options.
  4. 4. Export the file: Click Export to save your PDF. WPS will automatically calculate the correct page numbers for that sheet alone.
Fully compatible with Microsoft Excel (.xlsx, .xls) files and print layouts.Built-in 'Export to PDF' feature with precise active sheet selection.Customizable header and footer options for accurate page numbering.Free, lightweight, and easy to use across Windows, Mac, and Linux.
microsoft office alternative - wps office

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.