Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, 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: Putting Cell Contents in Footers.

Putting Cell Contents in Footers

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


3

You may find it helpful to sometime place the contents of a cell into the footer of a worksheet, and to have the footer updated every time the contents of the cell changed. The easiest way to do this is with a macro. The following is an example of a macro that will place the contents of cell A1 into the left side of the footer:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    ActiveSheet.PageSetup.LeftFooter = Range("A1").Text
End Sub

The macro is run every time Excel does its normal recalculation—meaning every time the contents of any cell changes or someone presses F9. If you want the contents to be in a different part of the footer, you can change LeftFooter to CenterFooter, or RightFooter.

To apply any formatting to the footer other than the default you will need to add special formatting codes, and you can also use special data codes that Excel recognizes for headers and footers. Both the special formatting and special data codes are quite lengthy and have been covered in other issues of ExcelTips.

If you are working with a very large worksheet, then changing the footer every time Excel recalculates may unnecessarily slow down your computer. After all, the footer remains invisible to the user until such time as the worksheet is actually printed. In this case, you simply need to rename the above macro to some other name that you would then manually execute as the last step before printing a worksheet.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8965) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Putting Cell Contents in Footers.

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

Using Text Boxes

Text boxes are handy for placing information in a container that can "float" over your worksheet. This tip explains what ...

Discover More

Disappearing Footnotes

Footnotes can be an integral part of many documents, particularly those written for a scholarly audience. If those ...

Discover More

Creating a Spelling Exclusion List

Don't like it when Word always says a word is spelled right and you know that it isn't? Here's how you can fine-tune the ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Ampersands in Headers and Footers

Add an ampersand to the text in a header or footer and you may be surprised that the ampersand disappears on your ...

Discover More

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

Last Saved Date in a Footer

When printing out a worksheet, you may want Excel to include, in the footer, the date the data was last saved. There is ...

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 four minus 0?

2022-10-02 10:57:12

J. Woolley

My first comment below says, "The result can be reviewed with Print Preview." Actually, Print Preview will show LeftFooter from the PREVIOUS time the workbook was printed.


2022-10-01 10:56:56

J. Woolley

For more on this subject, see my comments here: https://excelribbon.tips.net/T007990_Specifying_Date_Formats_in_Headers.html
https://excelribbon.tips.net/T000559_Using_a_Formula_in_a_Footer.html


2022-10-01 10:55:10

J. Woolley

Since the footer is most useful when the sheet is printed, this Workbook event procedure might be more appropriate than the Tip's Worksheet_Change:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet Is Sheet1 Then
    ActiveSheet.PageSetup.LeftFooter = Range("A1").Text
End If
End Sub

Replace 'Sheet1' if necessary. The result can be reviewed with Print Preview.


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.