How to Print Custom Headers and Footers in Excel

Q. How can I print a worksheet name in my spreadsheets?

A. You may not realize it, but you can generate very customized headers and footers in Excel. Let’s tackle the easy one first. Open a worksheet and, on the toolbar, click on File, Page Setup and then the Header/Footer tab.

Excel provides a bunch of default headers and footers. To see them, click on the down arrow at the right edge of the Header or Footer box.


If none of them meets your needs, click on either Custom Header or Custom Footer , which brings up this screen:

By placing your cursor in any of the boxes ( Left section, Center section, Right section ) and clicking on any of the icons, you can add the appropriate header or footer to that section of the spreadsheet.

For example, let’s say I want to add the page number on the left, a graphic in the middle and the date on the right. The setup screen then looks like this:

And when I print the page, it looks like this:

If none of the defaults meets your needs, here are some command codes you can manually add—by typing an ampersand (&) followed by the command (see below)—in any of the section boxes.

Code Meaning
&D Current date
&T Current time
&F Workbook name
& A Worksheet name (from the worksheet tab)
&P Current page number
&P+x Current page number plus x
&P-x Current page number minus x
&N Total pages in the workbook
&& Ampersand character


CPEOs provide peace of mind around payroll services

The creation of these new IRS-certified service providers for small businesses clarifies some issues around traditional professional employer organizations.


Pronoun practice to help polish your prose

Using pronouns correctly in writing and speech can help you make a good impression. Try our 10-question quiz.