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

Entering Characters with Diacritical Marks

Entering characters that use diacritical marks is easy as pie in Word and some other programs. Not so in Excel, it takes ...

Discover More

Separating a Date into Component Columns

Do you need a way to split dates out into the individual parts that make up that date? This tip provides two easy ways ...

Discover More

Changing a Field Parameter

Fields are a powerful way to add dynamic content to your documents. Some fields rely on the use of parameters to control ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Specifying the Y Value in X of Y Page Numbering

Page numbers in Excel headers and footers have always been a source of frustration for users. This tip recounts one ...

Discover More

Leading Zeros in Page Numbers

Page numbers in Excel printouts are typically simple counters, without much chance for embellishment. If you want to add ...

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 2 + 2?

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.