How To Enter Page Numbers In Excel | Insert Page Numbers in 2 Ways

Page numbers in Excel are added through the header or footer using Insert > Header & Footer, where placeholders like &[Page] update automatically.

Printing an Excel sheet without page numbers makes multi-page reports hard to follow, but the fix takes about ten seconds per worksheet. Excel places page numbers in the header or footer layer rather than inside the grid, which catches most new users off guard. The two official methods for how to enter page numbers in Excel both use the same placeholder codes and work across all modern versions.

Entering Page Numbers In Excel: The Two Official Methods

Microsoft gives you two ways to add page numbers, and both rely on the header/footer system built into Excel’s print layout. The faster route runs through the Insert tab and works best for single worksheets. The Page Setup dialog handles multiple sheets at once and gives you more control over positioning. Either way, the same placeholder codes — &[Page] for the current page and &[Pages] for the total — do the actual work.

The table below lists every header/footer element you can insert, including the ones most users never discover.

Element Placeholder Code What It Displays
Page Number &[Page] Current page number
Total Pages &[Pages] Total count of printed pages
Date &[Date] Current date from system settings
Time &[Time] Current time from system settings
File Path + Name &[Path]&[File] Full folder path and workbook filename
Sheet Name &[Tab] Name of the active worksheet tab
File Name &[File] Workbook filename without the path

The page number and total pages fields are the two you need for standard Page X of Y formatting. The others are useful when you want a more professional header or footer on printed reports.

Insert Page Numbers On A Single Worksheet

The fastest method uses the Insert tab and switches Excel to Page Layout view automatically, making the header and footer areas clickable.

  1. Go to the Insert tab and click Header & Footer in the Text group. Excel switches to Page Layout view.
  2. Click inside one of the three header boxes — Left, Center, or Right — or scroll down and click a footer box instead.
  3. On the Header & Footer tab that appears, click Page Number. The placeholder &[Page] appears in the box.
  4. To show Page X of Y, type a space, the word of, another space, then click Number of Pages. The box now shows &[Page] of &[Pages].
  5. Click anywhere outside the header/footer area. The actual page numbers replace the placeholders.
  6. Return to Normal view from the View tab or the status bar when you finish editing.

The placeholders disappear and the current page number appears in its place the moment you click outside the header area. Open Print Preview to confirm every page is numbered correctly.

Use The Page Setup Dialog For Multiple Sheets

When the same page numbering needs to apply to several worksheets at once, the Page Setup dialog saves significant time. Select all target sheets first — hold Ctrl and click each sheet tab — so the changes apply to the whole group.

  1. On the Page Layout tab, click the small arrow in the bottom-right corner of the Page Setup group to open the dialog.
  2. Go to the Header/Footer tab.
  3. Click Custom Header or Custom Footer.
  4. Click inside the Left, Center, or Right section box depending on where you want the number to sit.
  5. Click the Page Number button — the one labeled with a # symbol — to insert &[Page].
  6. Type the word of, then click the Number of Pages button to insert &[Pages].
  7. Click OK twice to close the dialog and apply the numbering.

The header/footer preview panel inside the Page Setup dialog shows the combined format before you confirm. After closing the dialog, switch to Print Preview to verify every selected sheet displays the correct numbers. Microsoft’s official support documentation for page numbers in Excel walks through both methods with screenshots.

How Does The Page Number Placeholder Actually Work?

The &[Page] and &[Pages] codes are dynamic placeholders, not static text. Excel replaces them with the correct values each time the sheet is printed or previewed. The page number corresponds to the printed page count, not the row or cell position — so one page of data still shows 1 of 3 even when the cursor sits on row 500 of a long sheet.

This is also why page numbers never appear in Normal view. They belong to the print layout system, not the editable grid. Microsoft keeps the two layers separate to prevent accidental edits to numbering during everyday data entry.

Changing The Starting Page Number

Excel starts page numbering at 1 for each worksheet by default. When you need to begin at a different number — for example, continuing from a previous report — the Page Setup dialog handles the change.

  1. Open the Page Layout tab and click the Page Setup dialog launcher (the small arrow in the bottom-right corner of the group).
  2. On the Page tab, locate the First page number box.
  3. The default setting is Auto. Type the starting number you want — for instance, 3 if this sheet follows page 2 of a larger report.
  4. Click OK to apply the change.

The page numbers in your header or footer now begin from that value. This setting applies only to the active sheet unless multiple sheets were selected before opening the dialog.

Mistake Why It Happens The Fix
Numbers not showing in Normal view Page numbers only appear in Page Layout view or Print Preview Switch to Page Layout view from the View tab or the status bar
Number inserted on the wrong side of the page Clicked the left box when the center or right box was needed Click the correct section box before inserting the placeholder
Placeholder text still visible Did not click outside the header/footer area after inserting Click any cell in the worksheet to finalize the insertion
Second sheet starts over at page 1 Each worksheet uses independent page numbering by default Select all target sheets before applying the numbering
Number shows as &[Page] after printing Placeholder was never replaced because the header area was not exited Click outside the header box, then check Print Preview again
Different first page numbering needed Default setting applies the same header/footer to every page Check Different first page in Header & Footer Options
Odd and even pages need separate formats Excel applies the same layout to all pages by default Check Different odd & even pages in Header & Footer Options

Page Numbering At A Glance

For most situations, the Insert > Header & Footer route is the fastest: it switches to Page Layout view, places the cursor in the header box, and gives you one-click access to the page number and total pages elements. Use it for single worksheets or quick setups.

For repeated work across multiple sheets — monthly reports, department printouts — the Page Setup dialog method saves time by applying numbering to a group at once. Select all sheets first, open the dialog, and choose Custom Header or Custom Footer.

In both cases, the Page X of Y format uses &[Page] of &[Pages], and the starting page number is adjustable from the Page tab in Page Setup. Once the placeholders are set, test the result with Print Preview before sending the report to the printer.

References & Sources