Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Moving Part of a Footer Down a Line.

Moving Part of a Footer Down a Line

Written by Allen Wyatt (last updated July 16, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


Let's say that you have a custom footer that you want at the bottom of all the pages in your worksheet. Left-justified in the footer, you want the full path name for the worksheet, and centered you want a page indicator in the format of Page X of Y.

Because the full path name can be rather long, it is possible that the path will "overprint" the page indicator. This, obviously, is not something you want to do. A better solution would be to push the page indicator down a line, so that it prints on its own line. Toward that end, you try the following:

  1. Choose Page Setup from the File menu. Excel displays the Page Setup dialog box.
  2. Make sure the Header/Footer tab is displayed. (See Figure 1.)
  3. Figure 1. The Header/Footer tab of the Page Setup dialog box.

  4. Click the Custom Footer button. Excel displays the Footer dialog box.
  5. With the insertion point in the Left Section area, click the folder tool. The code &[Path]&[File] appears in the Left Section area. (The folder tool is not available in Excel 97 or Excel 2000, and using the &[Path] code in those versions will not work.)
  6. With the insertion point in the Center Section area, you press Shift+Enter to move to the next line, then type Page followed by a space.
  7. Click the page number tool, type " of " and click the pages tool. The Center Section area now contains "Page &[Page] of &[Pages]", with a blank line before it.
  8. Close all the dialog boxes by clicking OK, as necessary.

When you print your worksheet, you think that the Shift+Enter keystroke (step 5) should move the center section of the footer down by a line. Unfortunately, it does not—Excel ignores the keystroke and places the center section of the footer on the first line, where it is overprinted by the left section of the footer. Drats!

The solution to the problem—without using a macro—is to follow these steps:

  1. Choose Page Setup from the File menu. Excel displays the Page Setup dialog box.
  2. Make sure the Header/Footer tab is displayed.
  3. Click the Custom Footer button. Excel displays the Footer dialog box.
  4. Make sure that all the sections of the footer are cleared; they should have nothing in them.
  5. With the insertion point in the Left Section area, enter the following, just as you see it here:
  6.      &[Path]&[File]
         &CPage &[Page] of &[Pages]
    
  7. Make sure that you split the lines by pressing Shift+Enter at the end of the first line. (If you are using Excel 97 or Excel 2000, leave out the &[Path] code.)
  8. Close all the dialog boxes by clicking OK, as necessary.

Notice the inclusion of the &C code at the beginning of the second line in step 5. This tells Excel that everything after it should be centered. The cool thing about doing the footer this way is that Excel, if necessary, will move down a line in order to print the centered information. If it can print the left portion of the footer on the same line as the center portion (the part after &C), then it will do so.

It is interesting to note that in my testing, simply putting a carriage return (Shift+Enter) at the end of whatever is in the Left Section area, and then entering information in the Center Section area still produced an overprint. The only way that this technique worked is if I used the &C code to center the page indicator.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2961) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Moving Part of a Footer Down a Line.

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

Checking for Words and Phrases

You may want to determine if a document contains a certain set of words or phrases. There are a couple of ways you can ...

Discover More

Ignoring Accented Characters in Searches

When writing in non-English languages, there can be many variations of accented characters that are used in a word. You ...

Discover More

Putting the Last Saved Date in a Cell

Do you need a cell in your worksheet to display the date on which the workbook was last saved? This can be a bit tricky, ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (menu)

Positioning Headers and Footers

If your workbook is destined for the printed page, you need to be concerned with the layout of that page. Excel allows ...

Discover More

Adding Ampersands in Headers and Footers

Place an ampersand into the text of a page header or footer, and you might be surprised to see it missing in your ...

Discover More

Putting a Different Date in a Header

Today's date is easy to add to a header, but what if you want to add a date that is adjusted in some manner? Adding ...

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 one less than 9?

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 menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon 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.