In the previous tip you learned about the different command codes you can use to insert data in your headers and footers. There are also a number of formatting command codes you can use. These codes, again, begin with an ampersand:
Code | Meaning | |
---|---|---|
&L | Start left alignment | |
&C | Start center alignment | |
&R | Start right alignment | |
&"fontname" | Change to designated font (quotes are necessary) | |
&nn | Two-digit font size to use, in points | |
&B | Bold (toggle on or off) | |
&I | Italics (toggle on or off) | |
&U | Underline (toggle on or off) | |
&E | Double underline (toggle on or off) | |
&S | Strikethrough (toggle on or off) | |
&X | Superscript (toggle on or off) | |
&Y | Subscript (toggle on or off) |
Command codes can be joined together on a line to achieve the desired result. For instance, if you wanted your footer to be a left-aligned, bold, and underlined current date, you would enter &L&B&U&D. You should note that it doesn't matter where you insert this information; the codes override where you enter it. Thus, if these codes were entered in the Center portion of the header or footer, the command codes would still place the date in the left portion, as you directed.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2057) applies to Microsoft Excel 97, 2000, 2002, and 2003.
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!
When adding headers or footers to your worksheets, you may want to include the date that the workbook was last edited. ...
Discover MoreEach new Excel worksheet contains a page header, by default. Follow this tip to get rid of headers you don't need.
Discover MoreWhen preparing a worksheet for printing, you may want to include in the header or footer the last date the workbook was ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments