What a header is and where it goes in Excel

A header in Excel is text or data that appears at the top of every printed page of your spreadsheet. It sits in a separate area above your actual worksheet data and repeats automatically on each page when you print. Headers are useful for adding titles, dates, page numbers, or file names so readers know what they are looking at.

Headers are different from the row of column letters (A, B, C) that Excel shows by default. Those column headers are always visible on screen. The header you add through the print settings only shows up when you print the document or view it in Print Preview. You access and edit headers through the Page Setup dialog, not by typing directly into cells.

Key Takeaways

  • Headers in Excel are added through the Page Setup dialog under the Header/Footer tab, not by typing into cells.
  • You can use built-in header templates like page numbers and file names, or type custom text in the left, center, or right sections.
  • Headers appear only when you print or use Print Preview, not in the normal spreadsheet view.
  • The same header repeats on every printed page unless you set up different headers for the first page or odd and even pages.

Opening the header editor in Excel

Start by clicking the Insert tab at the top of the ribbon. Look for the Header & Footer button in the Text group. Clicking it opens the Page Setup dialog directly to the Header/Footer tab. This is the fastest route on Windows and Mac.

If you do not see the Header & Footer button, you can reach the same dialog through File. Click File, then Print, then look for a link that says Page Setup (on Windows) or Print Settings (on Mac). This opens the full Page Setup dialog where you can edit headers.

Adding a straightforward header with built-in options

Once the Header/Footer tab is open, you will see a dropdown menu labeled Header with a list of preset options. These presets let you add common elements without typing. The list includes options like "Page 1", "Page 1 of ?", the file name, the sheet name, the current date, and the current time. Select the one you want, and it will appear in the preview box below.

If none of the presets match what you need, you can combine them or create something custom. Click the Custom Header button (or the pencil icon next to the dropdown) to open a second dialog with three sections: left, center, and right. Each section can hold different content. For example, you might put the file name on the left, the sheet name in the center, and the page number on the right.

Creating a custom header with your own text

In the Custom Header dialog, you will see three text boxes labeled Left section, Center section, and Right section. Click into whichever box you want to use and type your text. You can type anything — a title, a date, your company name, or a note to readers.

Above each text box are buttons that insert special codes. The button with an icon that looks like a calendar inserts the current date. The clock icon inserts the time. The page icon inserts the page number. The button with a "#" inserts the total number of pages (useful for "Page 2 of 5" style headers). Click the button, and the code appears in the text box. You can type around it — for example, type "Page " then click the page number button, then type " of " then click the total pages button to create "Page 2 of 5".

When you are finished, click OK to close the Custom Header dialog, then click OK again to close Page Setup. Your header is now set.

Viewing your header before printing

To see what your header will look like on the printed page, use Print Preview. Click File, then Print. The preview pane on the right shows your spreadsheet as it will appear when printed, including the header at the top. Scroll through the preview to check that the header looks correct and that your data lines up properly below it.

If the header overlaps your data or does not look right, go back to Page Setup and adjust it. You may need to increase the top margin to give the header more space, or reduce the size of the header text. Both of these adjustments are in the Margins tab of the Page Setup dialog.

Editing or removing a header

To change a header you have already created, open the Header/Footer tab again (Insert tab, then Header & Footer button). The current header appears in the preview. Click Custom Header to edit the text, or select a different preset from the dropdown menu.

To remove a header entirely, click the dropdown menu next to Header and select the blank option at the top of the list (usually labeled "(none)" or shown as empty). Click OK and the header will no longer print.

Setting different headers for different pages

By default, the same header prints on every page of your spreadsheet. If you want the first page to have a different header, or if you want odd and even pages to differ, the Page Setup dialog has options for this. Look for checkboxes labeled Different first page or Different odd and even pages. Check the box that applies to your situation.

Once you check the box, the Header dropdown will show separate fields for each type of page. Set up the header for the first page in one field, then set up the header for the remaining pages in another. This is useful if your first page is a title page and you do not want a header there, or if you want to alternate headers on left and right pages in a bound document.

Frequently Asked Questions

Why does my header not show up when I print?

Headers only appear in Print Preview and on printed pages, not in the normal spreadsheet view. Open Print Preview (File, then Print) to see whether the header is there. If it is not visible in Print Preview either, check that you have actually saved the header by clicking OK in the Page Setup dialog. If the header is in Print Preview but not on the printed page, your printer settings may be hiding headers — check your printer preferences.

Can I put an image or logo in the header?

The built-in header editor in Excel does not support images directly. However, you can insert an image into the header area by using the Insert tab and placing it above your data, then printing with specific margins. For a true logo in the header that repeats on every page, you would need to use a third-party tool or print to PDF and add the header there.

How do I add a header only to certain sheets in my workbook?

Headers are set per sheet, not for the entire workbook. Click on the sheet tab you want to edit, then open Page Setup and add the header. Switch to a different sheet tab and repeat the process. Each sheet can have its own header, or you can leave some sheets without headers.

What is the difference between a header and a footer?

A header appears at the top of each printed page, while a footer appears at the bottom. Both are set in the same Page Setup dialog. The process for creating a footer is identical to creating a header — just use the Footer dropdown instead of the Header dropdown.

Can I use different fonts or colors in my header?

The basic header editor does not allow font or color changes. The header uses the default font and black text. If you need formatted headers with colors or special fonts, you would need to create a custom header using Excel's VBA (macro) features or export to PDF and add formatting there.