Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Insert Page Numbers in Excel

· 8 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can add page numbers to your Excel data, but you cannot do it directly on the grid cells. Instead, you must use the Page Layout view or the Print dialog to add headers and footers. This inserts numbers into the print margins so they appear on every page of your printed report. You can choose to start at 1, continue from the previous sheet, or insert a specific custom number. This requires no external software, only the standard Excel interface.

What You'll Need

  • A computer running Microsoft Excel (Windows, Mac, or Web).
  • A worksheet with data that is long enough to span multiple pages when printed.
  • A printer connected to the computer or the ability to save as a PDF.

Step-by-Step

These instructions apply to the standard desktop versions of Excel on Windows and Mac. The steps are nearly identical, though the specific menu names may vary slightly by version. If you are using Excel on the web (browser), the options are located under the Print settings within the file menu.

Using Page Layout View (Recommended)

  1. Navigate to Page Layout View: Go to the bottom right corner of the Excel window and click the Page Layout View icon. This view shows you exactly how your pages will look when printed, separated by grey page breaks. If you are on a Mac, this is found under the View tab on the ribbon.
  2. Open the Header & Footer Tools: On Windows, a new tab called Header & Footer should appear at the top of the ribbon. If not, double-click inside the top or bottom margin of the page. You will see a dotted box appear, and the Header & Footer tab will activate.
  3. Insert the Page Number: Click the Design tab within the Header & Footer Tools (if not already open) and look for the Header & Footer Elements group. Click the Page Number button. This places a placeholder code like &[Page] in the header or footer area.
  4. Format the Number: The code &[Page] will automatically update to the current page number as you move between pages. To change the style, click directly on the number in the header/footer and use the formatting toolbar (bold, font size, italics) to adjust the appearance. You can also add text, like "Page" or "Report #", before or after the code.
  5. Repeat for All Pages: Page numbers inserted this way are applied to the specific sheet you are editing. If you have multiple worksheets and want the same numbering to continue across them, you must repeat this process on every sheet.

Using the Print Dialog (Alternative Method)

  1. Open Print Settings: Go to the File menu and select Print. This previews your document on the right side of the screen.
  2. Access Page Setup: Look at the bottom of the preview window or the settings area. Click the Page Setup link (or the arrow next to "No Scaling"). A dialog box will appear.
  3. Go to the Header/Footer Tab: In the Page Setup dialog, click the Header/Footer tab.
  4. Select a Preset or Custom:
    • Click the Custom Header or Custom Footer button.
    • In the dialog that opens, use the buttons on the left side to insert elements like Page Number, Number of Pages, or Current Date.
    • Click OK to save and return to the Print settings.
  5. Verify and Print: Ensure "Print Titles" or "Gridlines” are set how you like, then click the Print button. The page number will be printed on the physical paper.

Adding Page Numbers on Excel for Mobile (Android/iOS)

  1. Open the File: Launch the Excel app and open your spreadsheet.
  2. Tap the Three Dots: In the top-right corner of the screen, tap the three horizontal dots (menu icon).
  3. Select Print: Tap Print from the menu that appears.
  4. Tap Printer Options: Depending on the version, you may need to tap Printer Options or PDF Options.
  5. Tap Page Number: Locate the option to add a page number. In some versions, this is under Print Settings or PDF Options. Select Page Number to include it in your output.
  6. Save or Print: Tap Save as PDF or the printer icon to generate the file. Note that the mobile app offers fewer customization options than the desktop version.

Common Mistakes

  • Trying to Type Numbers Directly: A common error is trying to manually type "Page 1" at the top of every row. This is inefficient and will not update automatically when you add new rows or print. You must use the Page Layout view or Print settings.
  • Forgetting to Update the View: If you are in Normal view, the headers and footers are invisible. You must switch to Page Layout view or open the Print dialog to see or edit them.
  • Ignoring the Print Area: If your data is not set to print, the page numbers will not appear. Ensure your print area covers all the data you want to include. You can set this by going to Page Layout > Print Area > Set Print Area.
  • Incorrect Page Breaks: If a title or chart is split across two pages, the page numbers might look confusing. Adjusting manual page breaks (dragging the grey lines in Page Layout view) can ensure important elements stay together.

Tips

  • Use a Common Start Number: If you are printing a multi-part report, you can change the starting page number. Go to File > Print > Page Setup > Layout Tab > Page. Here, you can set the start number to 1, 101, or any other number to continue a previous sequence.
  • Include Total Pages: In the footer, you can add the total number of pages (e.g., "5 of 12"). This helps readers know if they are missing the end of the document. Add this by clicking the Total Pages button in the Header & Footer Tools.
  • Consistent Branding: Use the footer area to add your name, the document title, or the date. This makes the printed pages look professional and organized.
  • Check Margins: Sometimes page numbers are cut off because the margins are too small. Go to Page Layout > Margins and ensure you are using a standard margin setting, such as Normal or Wide.

Troubleshooting

If your page numbers are not appearing or looking wrong, follow these steps in order.

Page Numbers Are Missing

  1. Check Print Area: Go to Page Layout > Print Area. If it says "Clear Print Area,” your data is not set to print. Set the print area again to include your data.
  2. Verify View: Ensure you are in Page Layout View. Headers and footers are invisible in Normal view.
  3. Check Margins: If margins are set to Narrow or Custom, the header/footer text might be pushed outside the printable area. Switch to Normal margins.
  4. Excel Web Version: If using the browser version, ensure you have enabled print headers. This is usually a toggle in the print settings menu.

Numbering Does Not Continue Across Sheets

Excel treats each sheet as a separate document by default. To make page numbers continue across sheets (e.g., Sheet 1 ends at 5, Sheet 2 starts at 6), you must manually add the page number to the footer of every sheet. There is no built-in setting to link them automatically for printing.

Page Numbers Are Cut Off

  1. Adjust Margins: Increase the top or bottom margin slightly. This gives the header/footer more room.
  2. Change Header/Footer Design: Sometimes the default design pushes text too close to the edge. Click the Design tab and try a different "Header and Footer" design layout.
  3. Scale to Fit: If your data is very wide and is being scaled down, it might push elements out of bounds. Go to Page Layout > Scale to Fit and try changing the width to 1 page.

The Page Number Shows as "#

If you see # or # instead of a number, it usually means the cell width is too narrow to display the code. Click on the header/footer text and drag the right edge of the cell to widen it. This is a common issue when manually typing text next to the page number code.

Frequently Asked Questions

Can I put page numbers in the middle of a cell?

No, you cannot place page numbers inside a data cell (like A1) that represents the data itself. Page numbers must be placed in the header or footer of the page layout. They are part of the page definition, not the data grid.

How do I start page numbers at 1 on every sheet?

By default, Excel starts numbering at 1 on every new sheet. If you changed the start number previously, you can reset it by going to File > Print > Page Setup > Layout > Page and setting it to 1. Remember to do this for every sheet if you want them to start fresh.

Why are my page numbers not updating when I add rows?

If you add rows before the print area, the page count will increase, but the page numbers inserted in the header/footer are static placeholders. They do not automatically recalculate based on data changes. You do not need to update them; Excel will print the correct number based on the physical page count.

Can I insert a total number of pages in the footer?

Yes. In the Header & Footer Tools (Design tab), look for the Total Pages button in the Elements group. This inserts the code &[Pages] which will display the total number of pages in your document (e.g., "1 of 5").

Does Excel Web have the same features?

Excel for the web (in a browser) supports headers and footers, but the interface is simplified. You access these options primarily through the print settings menu. Advanced features like editing the header/footer code directly are not available in the web version.