Using X of Y in a Page Footer

Written by Allen Wyatt (last updated May 18, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


Terry remembers that "back in the day" he could add a page footer to a worksheet such as "Page X of Y," where X is the current page and Y is the total number of pages. He can no longer remember how to add such a footer, however.

Actually, there are two ways you can add such a footer to your worksheets. The traditional method (which is probably what Terry is seeking) is to follow these steps:

  1. Click the Page Layout tab of the ribbon.
  2. Click the small icon at the bottom-right of the Page Setup group. Excel displays the Page Setup dialog box.
  3. Make sure the Header/Footer tab is displayed. (See Figure 1.)
  4. Figure 1. The Header/Footer tab of the Page Setup dialog box.

  5. Click the Custom Footer button. Excel displays the Footer dialog box. (See Figure 2.)
  6. Figure 2. The Footer dialog box.

  7. Place the insertion point in whichever section of the footer you want used for the page information—left, center, or right.
  8. Type Page followed by a space.
  9. Click the Page Number tool. The code "&[Page]" appears in the footer.
  10. Type a space, the word of, and another space.
  11. Click the Pages tool. The section now contains "Page &[Page] of &[Pages]."
  12. Close all the dialog boxes by clicking OK, as necessary.

It should be noted that you don't have to really use the page number tool or the pages tool in putting the footer together. You could just as easily have typed the proper code ("Page &[Page] of &[Pages]") in whatever footer section you wanted used.

The second method of adding such a footer is to follow these steps:

  1. Display the Insert tab of the ribbon.
  2. Click the Header & Footer tool, in the Text group. Excel immediately switches to Page Layout view, displays the Header & Footer tab of the ribbon, and positions the insertion point in the center section of the header.
  3. Near the left end of the ribbon, click the Footer tool. Excel displays various footer options.
  4. Choose the "Page 1 of ?" option. Excel adds the proper code to the center section of the footer and hides the Header & Footer tab of the ribbon.
  5. Display the View tab of the ribbon.
  6. Click the Normal tool. Your worksheet is returned to a normal view.

It doesn't really matter which of the techniques you use to add the desired footer. Both of them place the exact same code into the footer.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13925) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Understanding Page Border Art

Add some artwork around the border of your printed page, and you may not know where that artwork comes from. You may also ...

Discover More

Protecting Document Areas from Global Replacements

You may have boilerplate text that you need to include in your document, and it would be detrimental to accidently change ...

Discover More

Changing the Footnote Continuation Separator

When you add a really long footnote to a document, it could be that the entire footnote might not fit on the page where ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Changing Page Number Format

Need your page numbers to not appear as regular Arabic numerals? Here's a way to get them to appear in a different ...

Discover More

Sequential Page Numbers Across Worksheets

How do you want your page numbers to appear on your printed worksheets? Chances are good that you want them to be ...

Discover More

Adding Graphics to a Header or Footer

Excel makes it easy to add graphics to a header or footer. Here's the steps to make it happen.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.