To add a header in Excel for Microsoft 365 on Windows, open the worksheet, choose Insert > Text > Header & Footer, click a header area at the top of the page, and type your text. The header appears on printed pages and in Page Layout view; it does not appear in the ordinary Normal worksheet view. Before starting, decide what the header should say and whether it should appear on every page.
An Excel page header is different from a table heading or a row of column labels. It is usually used for items such as a report title, date, or page number when printing or exporting to PDF. If you want column names to repeat at the top of each printed page, use Print Titles instead; that is explained below.
What You’ll Need
- A workbook opened in the Excel desktop app for Microsoft 365 on Windows, with permission to edit it.
- A worksheet with its page orientation and print area roughly set, if you already know how the report will print. You can still add a header before choosing those settings.
- The text or details you want to show, such as a report name, date, worksheet name, or page number. Excel can insert some of these as automatically updating fields.
Step-by-Step
- Open the worksheet you want to format. Headers are set for individual worksheets, not automatically for every sheet in a workbook. Select the relevant sheet tab at the bottom. If you need the same header on several sheets, you can group the sheets first by selecting the first tab, holding Shift, and selecting the last tab in the group. Be careful: changes made while sheets are grouped can affect all selected sheets. Right-click a selected tab and choose Ungroup Sheets when finished.
- Switch to the header editing view. On the ribbon, select Insert > Text > Header & Footer. Excel changes the worksheet to Page Layout view and displays three header sections across the top of the page: left, center, and right. If your ribbon is simplified or the window is narrow, the Text commands may be compressed; widen the Excel window or open the ribbon controls to locate Header & Footer.
- Choose where the header should appear. Click the left, center, or right section at the top of the page. A text cursor appears in the selected area. For example, put a report name in the center and a date on the right. You can use one section or more than one, but placing too much text in a single section may make it crowded or cause it to overlap another section when printed.
- Type ordinary text, or insert a changing field. Type the wording directly into the selected section for a fixed title. To insert a field that updates automatically, use the contextual Header & Footer tab that appears on the ribbon. Its Header & Footer Elements controls include items such as Page Number, Number of Pages, Current Date, Current Time, File Name, and Sheet Name. Click the required control while the cursor is in the intended section. You can combine fixed wording and fields, such as the word Page followed by a page number field.
- Use the header design controls if needed. The contextual tab includes formatting options such as different first page, different odd and even pages, and scaling the header with the document. Choose Different First Page if a cover page should have a distinct header or no header content. Choose different odd and even pages for a layout that alternates content, such as a bound report. These options affect how headers are applied, so enable them before checking each page.
- Review the result in Page Layout view. Click outside the header area or scroll through the worksheet. Page Layout view shows page boundaries and makes the header easier to inspect than Normal view. Check that the content is in the expected section, legible, and not too close to the page edge. If you cannot see all three sections, scroll to the top of the printed page or adjust the zoom.
- Check print output before relying on it. Choose File > Print to open Print Preview. Review the header on the first page and on a later page, especially if you enabled different first-page or odd/even headers. Confirm the selected printer, paper size, orientation, scaling, and page range. A header may be present but positioned unexpectedly if the print layout or margins differ from what you assumed.
- Return to your usual worksheet view. Select View > Normal to return to the regular grid. This does not remove the header; it only changes how the sheet is displayed. Save the workbook with Ctrl+S on Windows. In Excel for Mac, use Command+S to save; the ribbon layout and names can differ slightly, but use the Insert tab’s Header & Footer command to edit the worksheet header.
There is also a dialog-box route if you prefer to set the header while configuring the page. Open Page Layout, then click the small dialog box launcher in the lower-right corner of the Page Setup group. On the Header/Footer tab, choose a built-in header or select Custom Header to edit the left, center, and right sections. This route is useful when you are already adjusting margins, orientation, or print scaling.
Common Mistakes
- Confusing a page header with column headings. A page header sits in the print margin above the worksheet grid. It does not label columns or repeat a table’s first row. For repeating column labels, go to Page Layout > Print Titles. In the Page Setup dialog, use the Sheet tab and set Rows to repeat at top, such as the row containing your headings.
- Expecting to see the header in Normal view. The header is not displayed above the grid in the standard worksheet view. Switch to View > Page Layout or inspect File > Print to see it. The header can still print even when it is not visible in Normal view.
- Typing a page number as fixed text. If you type the numeral 1, each printed page may show 1. Use the Page Number control so Excel increments the number across pages. Add Number of Pages as well if you want a format such as Page 1 of 4.
- Adding content to the wrong sheet or section. Each worksheet has its own print setup, and the left, center, and right header areas are separate. Confirm the active sheet tab and click the intended section before typing. If sheets are grouped, remember to ungroup them after editing.
- Judging the layout only by the worksheet grid. Print scaling, paper size, margins, and printer settings affect the final page. Always check Print Preview, particularly for wide sheets or content close to the page edge.
Tips
- Keep headers concise. A short report name or label is easier to read and less likely to collide with another section. Put separate pieces of information in separate left, center, or right areas instead of stringing everything together.
- Use fields for information that changes. The Header & Footer Elements controls can insert the current date, current time, workbook file name, worksheet name, page number, and page count. These fields are more dependable than typing values that may become outdated. The displayed date and time follow Excel and system settings.
- Make a title page intentional. If the first page should be plain, enable Different First Page and leave its header section empty, while adding the desired header to later pages. If the first page needs a different title, enter that in its separate first-page header rather than deleting the regular header.
- Remember that headers are print features. They are useful in printed reports and PDFs, but not as a substitute for visible worksheet content. Put essential instructions or labels in cells if people need to see them while working in Normal view.
- Save a reusable layout as a template. If you frequently create similar reports, save a copy as an Excel template after checking the page setup. A new workbook based on that template can retain the header formatting, though you should still verify sheet-specific settings and print output.
- Use the desktop app for full control. Excel for the web has limitations for inserting or changing worksheet headers and footers. If the command is missing or the header cannot be edited in your browser, choose Open in Desktop App and make the change in Excel for Windows or Mac.
Troubleshooting
The header does not show in the worksheet. This is usually a view issue, not a lost header. Choose View > Page Layout, or open File > Print to confirm whether it is included in the page output. Returning to Normal view hides the header from the worksheet display but does not delete it.
The header is missing from Print Preview or the PDF. Confirm that you edited the active worksheet, rather than another sheet. Check whether Different First Page is enabled and whether you are previewing the first page. Also inspect the print area and page range: the preview may be showing a different sheet or page than expected. If the workbook is open in a browser, open it in the desktop app and check the Page Setup settings there.
The text is cut off, overlaps, or looks too small. Reopen the header section and shorten the wording or move content to another section. Then review the margins, paper size, and orientation under Page Layout. If the worksheet is scaled to fit, the header may also be scaled depending on the scaling setting on the Header & Footer tab. Check the print preview again after each adjustment rather than relying on the grid display.
The page number does not increment or the date looks wrong. Remove any number typed as ordinary text and insert the Page Number field from the contextual Header & Footer tab. For a total-page label, insert Number of Pages separately. For dates, use the Current Date field and verify your computer’s date and regional settings if the displayed format is unexpected.
The Header & Footer command is hard to find. Make sure you are in the desktop Excel app and that the ribbon is visible. Use Insert > Text > Header & Footer, or open the Page Setup dialog from the Page Layout tab and choose its Header/Footer tab. If a workbook is protected or opened read-only, you may need edit permission before changing its setup.
Frequently Asked Questions
How do I add the same header to every worksheet?
Group the target sheet tabs, add the header while the sheets are grouped, and then ungroup them. Verify a few sheets afterward because grouped editing applies changes to every selected worksheet, not necessarily every sheet in the workbook.
Can I add a header that shows the page number and total pages?
Yes. Click a header section, then use the Header & Footer tab to insert Page Number, type a separator such as of, and insert Number of Pages. Preview the workbook to confirm the numbering and page count are correct for the chosen print range.
Can I add a header in Excel for the web?
Header and footer editing is limited in Excel for the web. If you cannot find a working command, open the file in the desktop Excel app, add the header there, and save the workbook. You can then reopen it online to work with the file.
How do I remove a header?
Open Insert > Text > Header & Footer, click the section containing the content, select its text or fields, and press Delete or Backspace. You can also open Page Setup from the Page Layout tab, choose Header/Footer, and select a blank header or clear the custom header sections.
Why do my column titles not repeat on each printed page?
A page header is separate from worksheet rows. Choose Page Layout > Print Titles, then set Rows to repeat at top to the row or rows that contain your column labels. Check Print Preview to ensure the labels repeat on the intended pages.
Related
- How to Hide Columns in Excel Only for You Using Sheet Views
- Hide Columns in Excel on SharePoint Without Deleting Them
- Hide Columns in Excel Temporarily: Steps to Show Them Again
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Consolidate Multiple Columns Into OneYes. To combine values across columns on the same row, enter a formula such as =TEXTJOIN(" ",TRUE,A2:C2) in…
- Google Sheets: How to Copy Conditional Formatting RulesYes. In Google Sheets, copy a cell or range with the conditional formatting you want, select the destination,…
- Group Rows in Excel by Values: A Practical How-ToTo group rows in Excel by matching values, sort the list by the column you want to group,…
- Excel Data Table With Multiple Outputs: How It WorksYes. In Excel, a one-variable Data Table can return multiple outputs by placing a different formula above each…
- Out of Office in Outlook 365: Set It Up on Any DeviceTo set an out-of-office message in Outlook 365, open Automatic replies, turn them on, write your message, and—if…
- Laptop Excel Shortcut Keys: Essential Windows GuideThe most useful laptop Excel shortcut keys on Windows include Ctrl+C to copy, Ctrl+V to paste, Ctrl+Z to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.