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


Maximizing the higher education tax credits

A counterintuitive strategy can save taxes by including otherwise excludable scholarships in gross income.


Solving the lease accounting challenge

The challenges of the new lease accounting standard have been pervasive to say the least. In this free, independently-written report, you'll learn effective adoption strategies as well as resources for easing the transition to the new standard.