Excel doesn't add page numbers the way Word does
Excel doesn't have a simple "insert page number" button like Microsoft Word. Instead, page numbers live in the header and footer — the space at the very top and bottom of each printed page. To add them, you use the Page Layout tab and tell Excel where you want the numbers to appear.
The process is the same whether you're using Excel on Windows or Mac, and it takes about two minutes. The numbers won't show on your screen while you're working — you'll only see them when you print or switch to Page Preview mode.
Key Takeaways
- Page numbers in Excel go in the header or footer, which you access through the Page Layout tab on the ribbon.
- You can add just a page number, or combine it with text like "Page 1 of 5" to show the total number of pages.
- Page numbers only appear when you print the spreadsheet or view it in Page Preview mode.
- If your spreadsheet spans multiple sheets, each sheet gets its own page numbering that starts at 1 unless you change the starting number.
Adding page numbers using the Page Layout tab
Open your spreadsheet in Excel and click the Page Layout tab at the top of the screen. On the ribbon, look for a button labeled Print Titles or Page Setup — the exact name depends on your version of Excel. Click the small arrow in the bottom right corner of the Page Setup group to open the full Page Setup dialog.
Once the dialog opens, click the Header/Footer tab. You'll see two sections: one for the header (top of the page) and one for the footer (bottom of the page). Click in whichever section you want the page number to appear. Then click the Page Number button — it usually shows a "#" symbol. Excel will insert a code that looks like "&[Page]" into that section.
Click OK to close the dialog. Your page numbers are now set. Switch to Page Preview mode to see them: go to File, then Print, and look at the preview on the left side of the screen.
Creating "Page X of Y" format
If you want your pages to show "Page 1 of 5" instead of just "1", you can combine the page number code with text. Open the Page Setup dialog again and go to the Header/Footer tab. Click in the header or footer section where you want the numbers.
Type the word "Page " (with a space after it), then click the Page Number button. Excel adds the code. Now type " of " and then click the Pages button — this adds a code for the total page count. The result should read something like "Page &[Page] of &[Pages]".
Click OK. When you print or preview, it will show "Page 1 of 5", "Page 2 of 5", and so on. This format is especially useful for longer spreadsheets where readers need to know how many pages they're looking at.
Changing where page numbers start
By default, Excel starts numbering at 1 on every sheet. If you want the first page to be numbered 2, or if you're printing multiple sheets and want continuous numbering across them, you can change the starting number.
Go to Page Layout, then click Page Setup (the arrow in the bottom right of the group). Click the Page tab this time, not Header/Footer. Look for a field labeled First page number and enter the number you want to start with. Click OK.
This setting applies only to the current sheet. If you have multiple sheets in your workbook, you'll need to set the starting number separately for each one if you want them to continue numbering from the previous sheet.
Removing page numbers
If you've added page numbers and want to remove them, go back to Page Layout and open the Page Setup dialog. Click the Header/Footer tab, then click in the header or footer section that contains the page number code. Select all the text in that section and delete it. Click OK.
The page numbers will disappear from your printed output. If you only want to remove them from the header but keep them in the footer (or vice versa), just clear the section you don't want and leave the other one as is.
Page numbers in Print Preview vs. normal view
You won't see page numbers while you're editing your spreadsheet in the normal view. They only appear when you print the document or look at it in Print Preview. To check that your page numbers are positioned correctly before printing, go to File and click Print. The preview pane on the left shows exactly how your pages will look, including where the page numbers appear.
If the page numbers look wrong — too close to the edge, overlapping with data, or in the wrong position — go back to Page Setup and adjust the header or footer text. You can also change the margins if the numbers are too close to the edge of the page.
Troubleshooting common page number problems
If your page numbers aren't showing up at all, make sure you're looking at Print Preview or actually printing the document. Page numbers don't display in the normal editing view. Go to File > Print and check the preview on the left.
If page numbers appear on some pages but not others, check whether you've set up different headers or footers for the first page or for odd and even pages. Open Page Setup, go to the Header/Footer tab, and look for checkboxes labeled "Different first page" or "Different odd and even pages". If these are checked, you may need to add the page number code to each section separately.
If your page numbers are cut off or running into your data, the margin settings are too tight. Go to Page Layout > Margins and choose a larger preset, or click Custom Margins to adjust them manually. The header and footer sit within the top and bottom margins, so making those margins bigger gives the page numbers more room.
Frequently Asked Questions
Can I add page numbers to just one sheet in my workbook, not all of them?
Yes. Page numbers are set per sheet, so you can add them to one sheet and leave them off another. Just select the sheet you want to modify, open Page Setup, and add the page number code to the header or footer. The other sheets won't be affected.
What if I want page numbers only on printed pages, not on the screen?
That's the default behavior in Excel. Page numbers only show in Print Preview and on printed output. They never appear while you're editing the spreadsheet in normal view, so you don't have to do anything special.
Can I use a different format, like Roman numerals or letters instead of numbers?
Excel's page number code (&[Page]) only produces regular numbers. If you need Roman numerals or letters, you would have to manually type them into the header or footer instead of using the automatic page number button. This means updating them by hand if the page count changes.
Do page numbers print if I print to PDF instead of paper?
Yes. Page numbers appear in PDF files the same way they appear on printed paper. When you export or print your spreadsheet to PDF, the headers and footers — including page numbers — are included in the final file.
What happens to page numbers if I add or delete rows and the page breaks change?
Excel automatically updates the page numbers. If your data shifts to a different page because you added rows, the page number code adjusts automatically. You don't have to do anything — just make sure you're using the &[Page] code instead of typing numbers manually.