Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier 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 August 7, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and 2021


2

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. 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. With the insertion point in the Left Section area, click the folder tool. The code &[Path]&[File] appears in the Left Section area.
  8. With the insertion point in the Center Section area, press Shift+Enter to move to the next line, then type Page followed by a space.
  9. Click the page number tool, type " of " (without the quotes) and click the pages tool. The Center Section area now contains "Page &[Page] of &[Pages]", with a blank line before it.
  10. Close all the dialog boxes by clicking OK, as necessary.

When you print your worksheet, you think that the Shift+Enter keystroke (step 6) 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. 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.
  4. Click the Custom Footer button. Excel displays the Footer dialog box.
  5. Make sure that all the sections of the footer are cleared; they should have nothing in them.
  6. With the insertion point in the Left Section area, enter the following, just as you see it here. Make sure that you split the lines by pressing Shift+Enter at the end of the first line.
  7.      &[Path]&[File]
         &CPage &[Page] of &[Pages]
    
  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 6. 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 (9778) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Excel 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

Controlling Chart Gridlines

Gridlines are often added to charts to help improve the readability of the chart itself. Here's how you can control ...

Discover More

Adding Automatic Time Stamps

Your computer knows the current date and time, and Word provides ways you can get that date and time into your document. ...

Discover More

Vertical Alignment of Sections

Using one of the page setup options in Word, you can specify that the paragraphs within the section be vertically aligned ...

Discover More

Dive Deep into Macros! Make Excel do things you thought were impossible, discover techniques you won't find anywhere else, and create powerful automated reports. Bill Jelen and Tracy Syrstad help you instantly visualize information to make it actionable. You’ll find step-by-step instructions, real-world case studies, and 50 workbooks packed with examples and solutions. Check out Microsoft Excel 2019 VBA and Macros today!

More ExcelTips (ribbon)

Dynamic Headers and Footers

Do you want to change the headers and footers that appear on different pages of your printout? Here's how you can get ...

Discover More

First and Last Names in a Page Header

When you have a worksheet that includes a long list of names, you may want the first and last names on each page to ...

Discover More

Copying Headers and Footers

Need to copy headers and footers from one worksheet to another? How about from one workbook to another? Here are some ...

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 5 - 3?

2019-12-28 16:11:50

John Mann

I forgot one thing I meant to include.

Where can I fin information about that code "&c" to centre an item, and are there more similar codes. I didn't find anything dong a quick look through the Help files


2019-12-28 16:07:27

John Mann

That was interesting, and I have another method as a result of experimenting. I had wondered whether putting a non-printing character in from of the linde feed in the centre section of the footer laout would move the page number down. Didn't work. I then wondered about some dummy text before the line feedwhich could then be formated to the same colour as the paper (and hence invisible), but before changing the font colour I left it visiable and noticed that the text whicy was to become dummy was easily read, while the page number had overwritten the file path and name - the line feed had affected the left hand box of the footer dialogue.

So, put the page number information on the first line, in the centre box, followed by a line feed. No need for invisble dummy text (though a space will work), and the file path and name will be printed on the line below, on the 2nd line.

I tested using Excel 2010 in Windows 10. Most of the test were done using the print preview provided by Excel, but the final version was actually printed.


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.