How to insert a page number in Microsoft Excel
Updated: 09/03/2019 by Computer Hope
![Microsoft Excel](/cdn/excel.png)
When working with spreadsheets in Microsoft Excel, it may be helpful to include page numbers, especially if the spreadsheet is many pages long. You can insert a page number in either the header or footer of a spreadsheet, depending on your preference.
To insert page numbers in your spreadsheet, view them, or edit previously-added page number details, select a link below and follow the instructions.
Insert a page number
- In the Excel spreadsheet, click the Insert tab in the Ribbon.
- In the Text section, click the Header & Footer option.
- The spreadsheet changes to the Page Layout view if it hasn't already. The text cursor is placed in the header by default. To insert a page number in the footer, press Esc, scroll down to the bottom of the page, and click in the Add footer area.
- In the Ribbon, if not already selected, click the Header & Footer tab.
- With the text cursor in the header or footer, click the Page Number option in the Header & Footer Elements section on the Ribbon. The &[Page] text is added to the header or footer, which is the Excel function for the page number.
- To display the total number of pages after the page number, add a space after &[Page], type the word of, add another space, then click the Number of Pages option in the Ribbon. The &[Pages] text is added and is the Excel function for displaying the total number of pages in the spreadsheet.
- Input any additional text to the header or footer, as desired. For example, you could add Page in front of the page number, resulting in a display of "Page 1 of 4."
View page numbers
- In the Excel Ribbon, click the View tab.
- In the Workbook Views section, click the Page Layout option.
- The page numbers are only displayed in the Page Layout view.
Edit page number details
- In the Excel Ribbon, click the View tab.
- In the Workbook Views section, click the Page Layout option.
- Click in the header or footer, depending on where the page number details are set. Enter or change the text, as desired.