How to Add Page Numbers in Excel
Add page numbers in Excel using Insert > Header & Footer. Use &[Page] code, Page X of Y format, custom starting numbers, and Page Setup options.

Excel's page numbers live in the header or footer, and once you know where to click they only take a few seconds to add. You won't see them on the regular grid view, which trips up plenty of people who think nothing happened. Switch to Page Layout view and the numbers appear in the margins, exactly where the printer will put them.
This guide walks through every method — the quick Header & Footer button, the &[Page] field code, custom starting numbers, "Page X of Y" formatting, per-section numbering, and how to wipe them out when you're done. We'll cover Excel 2016, 2019, 2021, Microsoft 365, and Excel for Mac. The steps are nearly identical, with one or two ribbon differences noted as we go.
Why bother? Printed spreadsheets without page numbers are a nightmare. Try collating a 40-page financial report after dropping it on the floor. Page numbers turn a stack of paper into a navigable document, and for any printed deliverable — audit binders, board packs, lab reports — they're not optional. PDF exports inherit them too.
Quick Method: Insert > Header & Footer
The fastest path uses the Insert tab. Open your workbook, click the Insert ribbon, then hit Header & Footer in the Text group. Excel jumps to Page Layout view and drops your cursor inside the header box at the top of the sheet.
You'll see three boxes — left, center, right. Click the one you want. The ribbon now shows a Header & Footer contextual tab. Hit the Page Number button and Excel inserts the code &[Page]. Click any cell outside the header to commit it. Print preview will now show "1" on page one, "2" on page two, and so on.
Want it at the bottom instead? Scroll to the footer area of any printed page in Page Layout view, click the footer box, then hit Page Number. Same code, same result — just at the bottom of the printout. Most reports use footer placement because it keeps the top of the page clean for titles and dates.
What you'll actually see
Inside the header box, the field reads &[Page] — that's just the placeholder. When Excel renders the print job, that code becomes the actual page number. Don't type "1" manually unless you want every page to say "1". The brackets and ampersand do the work.

View Mode Matters
Page numbers are invisible in Normal view — that's the default grid you see when you open Excel. To check your work, switch to Page Layout view (View tab > Page Layout) or hit Print Preview (Ctrl+P on Windows, Cmd+P on Mac). If you don't see the numbers there, they aren't going to print. Some users panic and add them three times.
Using the &[Page] Field Code Directly
If you prefer typing, you can write the code by hand. Click into a header or footer box, then type &[Page] exactly — ampersand, open bracket, capital P, lowercase rest, close bracket. Excel converts it to a live page number when you click out.
This matters because you'll often mix the code with text. Common patterns:
Page &[Page]→ Page 1, Page 2, etc.&[Page] of &[Pages]→ 1 of 12Page &[Page] of &[Pages]→ Page 1 of 12- &[Page] -→ - 1 - (classic centered style)
The &[Pages] code (plural, with an "s") returns the total page count. Excel calculates this at print time, so it stays accurate even if you add rows that push the print job from 8 pages to 12. The pair gives you the "Page 1 of 12" style every formal document uses.
Mac vs Windows quirks
On Excel for Mac, the field codes look the same in the cell, but the ribbon may show them as buttons labeled "Page Number" and "Number of Pages" instead of the icon-only Windows version. The result is identical. If a workbook was created on Mac and opened on Windows (or vice versa), the codes survive the round trip.
Current page number. Replaces with 1, 2, 3, etc. at print time.
Total page count. Used for "Page X of Y" patterns alongside &[Page].
Today's date. Updates every time you print or preview the file.
Current time. Often paired with date in audit-style footers.
Workbook filename. Handy for stacks of printouts that may get separated.
Active sheet name. Shows which tab generated each printout.
Starting Page Numbers from Something Other Than 1
Sometimes you need page 1 to be labeled "5" — maybe the spreadsheet is appendix material in a larger report, or it follows a Word document that ended on page 4. Excel handles this through Page Setup, not the header box itself.
Go to the Page Layout tab on the ribbon, then click the tiny arrow in the bottom-right corner of the Page Setup group. The Page Setup dialog opens. On the Page tab you'll see a field labeled First page number. The default is "Auto" (which means 1). Replace that with whatever number you want — 5, 17, 100 — and click OK.
Now page one of the spreadsheet prints as "5", page two as "6", and so on. The &[Page] code respects the offset automatically — you don't need to change anything in the header.
Practical use cases
Continuation pagination is the biggest one. If your annual report PDF is built from a Word file (pages 1–24) plus an Excel sheet (pages 25–30), set the Excel first page number to 25 before exporting. Readers see continuous pagination across the whole document and never know two tools made it.
Another scenario: a 200-page audit binder where each tab is numbered sequentially. Each Excel file gets a different starting number, so the printed binder reads 1 through 200 without a single duplicate.

Just a number, nothing fancy.
Insert > Header & Footer > click footer box > Page Number button.
Field code: &[Page]
Output: 1, 2, 3...
The "Page X of Y" Format in Detail
"Page 1 of 12" is the gold standard for printed Excel work. It tells the reader where they are and how much is left. Building it takes one line in the footer.
Open the header/footer editor (Insert > Header & Footer, then click the footer area). In the box you want, type:
Page &[Page] of &[Pages]
Click outside the box. Switch to Print Preview. You should see "Page 1 of 12" (or whatever your real page count is) at the bottom of every printed page. Excel updates the "Pages" half whenever rows are added or removed — you never edit it again.
Why the brackets matter
Excel's field codes are case-sensitive in spirit but tolerant in practice. &[Page] works. &[PAGE] works. &[page] also works. What does not work is missing the brackets or putting a space inside — &[ Page] renders as literal text instead of a number. If your "1" prints as "[Page]", check for typos in the brackets.
What if Excel shows "&[Page]" literally in print?
That usually means the code was entered into a regular cell instead of the header box. Field codes only work inside header and footer regions. If you typed it into A1, Excel treats it as plain text. Delete and start over from Insert > Header & Footer.
If you type 1 directly into the footer box (instead of &[Page]), every printed page will literally say “1”. The number won't increment. Always use the field code or the Page Number button — never type the digit yourself.
Different Page Numbers Per Worksheet
A workbook with five tabs prints each tab as its own job by default, and each one restarts numbering at 1. That's usually what you want — the "Sales" tab pages 1–4, the "Expenses" tab pages 1–3, etc.
To make them flow continuously (Sales = 1–4, Expenses = 5–7, total binder = pages 1–7), use the First page number trick from earlier. For each subsequent sheet, set First page number to the next value after the previous sheet ended.
This needs manual maintenance — if you add rows to the Sales tab and it grows to 5 pages, you have to bump every later sheet by one. Not ideal for documents that change often. For dynamic continuous numbering across sheets, consider exporting all tabs to a single PDF and letting the PDF tool handle pagination.
Shortcut: select all sheets first
If you want every sheet in the workbook to share the same footer (say, all five tabs show "Page X of Y"), right-click any sheet tab and choose Select All Sheets. Then open Header & Footer and edit once — the change applies to every selected sheet. Just remember to ungroup the tabs when you're done, or every edit you make next will hit all five sheets.

- ✓Open the workbook and click the Insert tab on the ribbon
- ✓Click Header & Footer in the Text group to switch to Page Layout view
- ✓Click the header or footer box where you want the number (left, center, or right)
- ✓Hit the Page Number button on the contextual Header & Footer tab
- ✓For "Page X of Y" type: Page &[Page] of &[Pages] in the footer box
- ✓Switch to Print Preview (Ctrl+P / Cmd+P) and verify the numbers appear correctly
- ✓Open Page Setup (Page Layout > arrow) to change first page number if needed
- ✓Save the workbook so the header settings persist across reopens
Removing Page Numbers
Easiest method: Insert > Header & Footer, click into whichever box holds the number, select the &[Page] text (and any surrounding "Page" or "of" wording you added), hit Delete, click out. Switch to Print Preview to confirm they're gone.
You can also wipe everything at once. With the header/footer editor open, click the Header & Footer dropdown on the contextual tab and pick (none). That blanks all three boxes — numbers, titles, dates, everything. Useful when you're cleaning up a template for fresh content.
Different first page
Maybe page 1 is a cover sheet that shouldn't show a number, but pages 2 onward should. Open Page Setup (Page Layout tab > arrow icon), go to the Header/Footer tab, and check Different first page. Now page 1 gets its own header/footer pair, separate from the rest. Leave page 1's footer blank and put &[Page] on the second-and-later footer. Excel handles the offset.
This is the same logic Word uses, just with Excel's quirkier UI. If your cover page should also not count toward the total, you'd need to set First page number to 0 on the rest — then page 2 of the workbook prints as page 1 of the report, which is what most readers expect.
Removing from every sheet at once
If you accidentally added page numbers to all five tabs and want them gone from all of them, right-click any sheet tab and choose Select All Sheets. Open Insert > Header & Footer, clear the field, click out, then right-click again and choose Ungroup Sheets. Every tab is now clean. Skipping the ungroup step is a common gotcha — if you forget, the next edit you make to a single cell will replicate across all sheets.
- +Field codes (&[Page], &[Pages]) auto-update when content changes
- +Same workflow on Windows, Mac, and Excel for the web
- +Three placement zones (left, center, right) in both header and footer
- +First page number override handles continuation pagination cleanly
- +Different first page option supports cover sheets without manual editing
- +Numbers carry through to PDF exports automatically
- −Invisible in Normal view — users often think nothing happened
- −Each worksheet tab has its own header/footer by default, requiring manual sync
- −Continuous numbering across sheets needs manual maintenance when row counts change
- −Typing &[Page] into a regular cell does nothing — only works inside header/footer regions
- −Mac ribbon labels differ slightly from Windows, causing minor friction
Troubleshooting Common Issues
You added the field code, hit print, and something looks wrong. Here are the usual suspects.
Every page says "1"
You typed the literal digit 1 instead of the field code. Open Insert > Header & Footer, delete the "1", and either click the Page Number button or type &[Page] with the brackets. Reprint — it should increment now.
The page number prints as "&[Page]"
The code was entered into a cell, not the header. Or the brackets have spaces inside them — &[ Page ] won't render. Re-enter cleanly: &[Page], no spaces.
Numbers don't appear at all
Switch to Page Layout view (View tab > Page Layout). If you see them there but not on the printout, your printer driver may be cropping margins. Open Page Setup > Margins and increase the Header or Footer value (try 0.5 inches). Some inkjet printers won't print closer than 0.4 inches to the edge.
"Page X of Y" shows wrong total
Excel calculates total pages based on what fits the current print area and page size. Change the orientation from Portrait to Landscape and the count changes. Confirm in Print Preview — the number Excel shows there is what will print. If you have hidden rows or columns set to print, they don't add to the total.
Custom starting number was ignored
Check Page Setup > Page tab > First page number. If it says "Auto", Excel uses 1 regardless. Type a literal number (5, 25, 100) and click OK. Also verify the workbook isn't grouped — if multiple sheets are selected, the change might have applied to a different tab.
Numbers move position when printing
You probably used Custom Header instead of the three-box layout. Excel's three boxes (left/center/right) auto-anchor based on margin. Custom Header lets you place text at pixel coordinates, which prints differently on every printer. Stick with the standard three-box layout for portable results.
Wrapping Up: Page Numbers in Three Clicks
The 80% solution is dead simple. Insert > Header & Footer > Page Number. That covers most printouts, most reports, most everyday Excel work. The extra mile — "Page X of Y", custom starting numbers, different first pages — lives in the same Header & Footer area and the Page Setup dialog, and once you've done each one once, the muscle memory sticks.
Two habits will save you future headaches. First, always preview before printing. Page Layout view or Print Preview shows exactly what hits the paper, including the page numbers. Second, lean on field codes (&[Page], &[Pages]) instead of typing static numbers. The codes adapt when your data grows. The static numbers don't.
Once you've mastered page numbers, the rest of Excel's header/footer system opens up. Logos, date stamps, file names, sheet tabs — all built from the same handful of &[Code] placeholders. A workbook with clean headers and accurate page numbers reads like a published document. That's worth the three clicks.
Bonus: keyboard shortcuts worth knowing
Speed matters when you're prepping reports. Three shortcuts will save you a lot of mouse miles. Ctrl+P (Cmd+P on Mac) opens Print Preview directly — the fastest way to verify page numbers before sending a job. Alt+W, P on Windows jumps to Page Layout view without touching the View tab. And inside the header/footer editor, Tab moves between the left, center, and right boxes, so you can fly through edits without clicking each one.
If you do a lot of report formatting, consider saving a workbook template with your standard footer already wired up — "Page &[Page] of &[Pages]" centered, file name on the left, date on the right. Save it as an .xltx template (File > Save As > Excel Template). Every new workbook from that template starts with pagination ready to go. No more rebuilding the footer five times a week.
A note on shared workbooks
If you collaborate via OneDrive or SharePoint, page numbers behave the same way for everyone. The header/footer settings are part of the file, not the user. So when Sarah edits a row and Mark prints the result, both prints show the same page numbers based on the latest content. That's a small thing but it matters — older Excel versions sometimes had per-user view state that broke this. Modern Microsoft 365 doesn't.
Excel Questions and Answers
About the Author
Attorney & Bar Exam Preparation Specialist
Yale Law SchoolJames R. Hargrove is a practicing attorney and legal educator with a Juris Doctor from Yale Law School and an LLM in Constitutional Law. With over a decade of experience coaching bar exam candidates across multiple jurisdictions, he specializes in MBE strategy, state-specific essay preparation, and multistate performance test techniques.