This tutorial shows how to add page numbers in Excel. First, we will add page numbers to a single worksheet. Next, we will add page numbers to multiple worksheets at once. Then, we will change the starting page number, including how to update the page total when using a custom starting page.
The bonus section at the end shares a prompt Microsoft 365 subscribers can use to insert the page number with Copilot.
These steps apply to Excel for Microsoft 365, Excel 2024, Excel 2021, Excel 2019, and Excel 2016 on Windows and Mac. These steps don’t apply to Excel for the web or mobile.
Watch this tutorial in real-time on my YouTube channel:
Table of Contents
- How to Add Page Numbers to a Worksheet
- How to Add Page Numbers to Multiple Worksheets
- How to Change the Starting Page Number
- How to Update the Page Total with a Different Starting Page Number
- Bonus Section: Add Page Numbers with Copilot (Microsoft 365 Only)
How to Add Page Numbers to a Worksheet
- Open the worksheet that should receive the page numbers.
- Select the Insert tab in the ribbon.
- Select Header & Footer in the Text group. Excel will switch to the Page Layout view.
- Click in the left, center, or right section of the header or footer where you want the page numbers to appear.
- Select Page Number in the Header & Footer tab.
The page number code will appear in the header or footer section you choose. This code will only insert the page number itself.
- (Optional) Type a space, type of, type another space, and then select Number of Pages if you want a format such as “1 of 3.”
- Click outside the header or footer area to see the page number in Page Layout view.
- (Optional) Select the View tab and Normal to return to the normal view.
How to Add Page Numbers to Multiple Worksheets
- Select the worksheets you want to format.
-
- Press and hold the Shift key to select adjacent sheets.
- Press and hold the Ctrl key (PC) or Command key (Mac) to select nonadjacent sheets.
- Select the Page Layout tab.
- Select the Page Setup dialog box launcher (PC) or Page Setup button (Mac).
- Select the Header/Footer tab in the Page Setup dialog box.
- Select Custom Footer or Custom Header.
- Click in the left, center, or right section.
- Select the Page Number button.
- (Optional) Type a space, type of, type another space, and then select the Number of Pages button if you want a format such as 1 of 3.
- Select the OK button in the Header or Footer dialog box.
- Select the OK button in the Page Setup dialog box.
- (Optional) Select the View tab and Page Layout to see the page numbers.
Each worksheet will start at page 1. However, you can create continuous numbering by changing the first page number for the later worksheets, as explained in the next section.
How to Change the Starting Page Number
- Open the individual worksheet.
- Select the Page Layout tab.
- Select the Page Setup dialog box launcher (PC) or Page Setup button (Mac).
- Select the Page tab in the Page Setup dialog box.
- Enter the starting number in the First page number text box.
- Select the OK button.
How to Update the Page Total with a Different Starting Page Number
Excel won’t automatically update the total number of pages if you are using the page # of # format with a different starting page number. However, you can manually correct this issue after changing the starting page number.
- Select the worksheet or sheets.
- Press Ctrl + P (PC) or Command + P (Mac) to open the Print screen.
- Take note of the total number of pages shown in the print preview and then return to the ribbon.
- Select the Page Layout tab.
- Select the Page Setup dialog box launcher (PC) or Page Setup button (Mac).
- Select the Header/Footer tab in the Page Setup dialog box.
- Select the Custom Header or Custom Footer button, depending on where the numbers are located.
- Delete &[Pages] in the section text box.
- Use the total number of pages noted in step 3 to calculate a final page count from your updated starting page number and then type that newly calculated number in place of &[Pages].
For example, if your worksheet has a total of 7 actual pages, but you are starting at page number 5, the new total would be 11.
- Select the OK button in the Header or Footer dialog box.
- Select the OK button in the Page Setup dialog box.
Bonus Section: Add Page Numbers with Copilot (Microsoft 365 Only)
If you are a Microsoft 365 subscriber, you can prompt Copilot to insert page numbers into your Excel worksheets. This process currently works best if your existing headers and footers are empty and your page numbers start at page 1.
- Select Copilot in the Home tab or in the bottom, right corner of the screen.
- Ensure that Allow editing is select above the prompt box.
- Enter a descriptive prompt into the prompt text box, such as:
Add page numbers in the center section of the header using the format Pages # of #. Apply to every worksheet in this file.
- Select the Send button.
- Select the Done button when Copilot finishes inserting the page numbers.
- Select the View tab and Page Layout to review the page numbers.
Related Resources
How to Address Letters in Microsoft Word with Mail Merge from an Excel File (PC & Mac)
How to Print Multiple Envelopes in Microsoft Word from an Excel File