You may need to display page numbers as fractions in an Excel workbook, such as for legal documents or specific numbering schemes. Excel’s standard page number field only inserts whole numbers. This article explains how to use custom header and footer codes to create fractional page numbers like 1/3 or 2/5. You will learn to combine the page number and total pages fields with text to build the correct format.
Key Takeaways: Formatting Fractional Page Numbers
- Insert > Header & Footer > Custom Header/Footer: Access the dialog box where you enter the special code to create a fraction.
- &[Page] / &[Pages] code: This combination displays the current page number, a slash, and the total number of pages in the workbook.
- Page Layout view: Use this view to see your fractional page numbers update live as you edit the sheet.
Understanding Excel’s Header and Footer Code System
Excel headers and footers do not use standard cell formulas. Instead, they use a system of codes prefixed with an ampersand (&). These codes are replaced with dynamic data when you print or view the sheet in Page Layout mode. The two primary codes for pagination are &[Page] for the current page number and &[Pages] for the total number of pages in the print job.
To show a fraction, you combine these codes with a separator, like a slash or hyphen. You must type the codes and the separator directly into the header or footer text box. The result is a static-looking fraction that updates correctly for each page. For example, the code &[Page]/&[Pages] will appear as 1/4 on the first page of a four-page printout.
Steps to Insert a Page Number Fraction
Follow these steps to add a fractional page number to your sheet’s header or footer.
- Switch to Page Layout view
Click the View tab on the ribbon. Then, click the Page Layout button in the Workbook Views group. This view shows headers and footers directly on the sheet. - Click the header or footer area
Scroll to the top or bottom of the page. Click inside the text box that says Click to add header or Click to add footer. The Header & Footer Tools Design tab will appear on the ribbon. - Navigate to the custom dialog
On the Design tab, find the Header & Footer group. Click the Header or Footer button, then select Edit Header or Edit Footer from the bottom of the drop-down menu. This opens a more detailed dialog box. - Enter the fraction code
In the dialog box, click inside the Left, Center, or Right section box where you want the fraction to appear. Type the code: &[Page]/&[Pages]. You can add text before or after, like Page &[Page]/&[Pages]. - Apply and view the result
Click OK to close the dialog box. Your fractional page number will now appear in the selected section. Scroll through the pages in Page Layout view to see the numbers update.
Using the Ribbon’s Quick Insert Buttons
You can also build the fraction using the ribbon buttons without memorizing the code.
- Insert the current page number
With the header or footer area active, go to the Header & Footer Tools Design tab. In the Header & Footer Elements group, click Page Number. This inserts &[Page] at your cursor’s location. - Type the separator
Type a forward slash (/) character directly after the inserted code. - Insert the total number of pages
Click the Number of Pages button in the same ribbon group. This inserts &[Pages] after the slash. - Click outside the header
Click on any worksheet cell to exit the header/footer editing mode. The fraction will be displayed.
Common Formatting Mistakes and Limitations
Fraction Appears as Code &[Page]/&[Pages]
If you see the literal code text instead of numbers, you are likely in Normal view. The codes only render in Page Layout view or Print Preview. Switch to Page Layout view from the View tab to see the correct fraction.
Page Numbers Reset to 1 in Each Worksheet
By default, each worksheet in a workbook starts counting pages from 1. If you need continuous numbering across sheets, you must set the starting page number. Go to Page Layout > Page Setup > Dialog Launcher > Page tab. Under First page number, enter the number you want that sheet to start with.
Cannot Use Cell References or Formulas
Header and footer codes are plain text and cannot reference worksheet cells or use Excel functions like TEXT. The fraction is built solely from the &[Page] and &[Pages] codes. For complex numbering, you may need to use a helper column in the sheet and reference it in the print area.
Standard Number vs. Fractional Number Format Comparison
| Item | Standard Page Number (&[Page]) | Fractional Page Number (&[Page]/&[Pages]) |
|---|---|---|
| Display Format | Whole number only | Shows as a ratio or fraction |
| Typical Use Case | Simple sequential numbering | Documents showing page position within total |
| Setup Method | Insert Page Number button | Manual code entry or two-button combination |
| Dynamic Update | Updates per page | Both parts update per page and if total changes |
| Custom Text Addition | Can add text before/after code | Text can be placed around the entire fraction |
You can now add professional fractional page numbers to your Excel printouts. Use the Page Layout view to edit headers and see changes instantly. For more control, explore the Page Setup dialog to adjust margins and scaling. Try using different separators like a hyphen in the code &[Page]-&[Pages] for an alternative format.