excel number of pages

Copper Contributor
Hello, I can't show the number of pages in Excel in the header. when I go to the header and click on number of pages, the normal entry - &[page] - appears in the header....that fits so far..... but as soon as I exit the header, only a hash character is displayed - # - and no number....

Date or sheet name works but only page number or page count doesn't work.

Could someone please help me...I've read and tried everything but nothing helps.

Thanks very much!!

Screenshot 2023-07-30 162258.pngScreenshot 2023-07-30 162317.png


3 Replies
best response confirmed by Stevensco (Copper Contributor)


That is because your sheet is completely empty.

As soon as you populate some cells, you'll see the actual page number.

Hallo Hans,
vielen Dank für deine schnelle Antwort. Das habe ich nicht gewusst.
Jetzt funktioniert es!! Super vielen lieben Dank!!!

Hello Hans, thank you for your quick reply. I did not know that. It works now!! Thank you very much!!!


It sounds like you're experiencing an issue with the page numbering feature in Excel headers. This could be due to various factors, including formatting settings, printing options, or specific Excel version behaviors. Here are some troubleshooting steps you can take to address the problem:

  1. Check Print Preview: Sometimes, the page numbering might not display correctly within the Excel program itself, but it could appear correctly in the print preview or when you actually print the document. Ensure you've checked the print preview or printed the document to see if the page numbers show up as expected.

  2. Try Different Header/Footer Sections: Excel allows you to have different headers and footers for odd and even pages, as well as the first page. Make sure you're editing the correct section where you want the page numbers to appear.

  3. Use &[Pages] instead of &[Page]: Instead of using &[page], try using &[Pages] in the header/footer. The &[Pages] code should display the total number of pages correctly.

  4. Clear Header/Footer and Reapply: Clear any existing header or footer text and reapply the &[Pages] code to see if it resolves the issue.

  5. Check Page Setup Settings: Make sure your page setup settings are configured correctly. Go to the "Page Layout" tab, click on "Page Setup" in the Page Setup group, and check settings related to margins, orientation, and scaling.

  6. Update Excel: If you're using an older version of Excel, consider updating to a more recent version to ensure compatibility with the latest features and fixes.

  7. Try in a New Workbook: Create a new Excel workbook and test whether the page numbering works correctly in the header. This can help determine if the issue is specific to your current workbook.

  8. Check for Updates: Make sure you have the latest updates and patches installed for your version of Excel. Sometimes, issues can be resolved through updates.

  9. Repair Office Installation: If the issue persists, you might consider repairing your Microsoft Office installation through the Control Panel or equivalent settings on your operating system.

If you've tried these steps and the issue still persists, it might be helpful to provide more specific information about your Excel version, operating system, and any relevant settings or configurations you've applied. This could assist in diagnosing the problem more accurately. Additionally, you could reach out to Microsoft support or relevant online forums for further assistance.