• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • iPhone
  • Office
  • Google
  • Windows & Mac
  • Apps & Devices
  • WordPress
  • All guides
Home/Microsoft Office/How to Add the Filename to the Header in Excel
Microsoft Office

How to Add the Filename to the Header in Excel: A Step-by-Step Guide

By Matthew Burleigh · May 15, 2024 · 4 min read

Adding the filename to the header in Excel is a handy feature, especially for those who juggle multiple spreadsheets. It helps in identifying your files at a glance. Here’s a quick way to do it: go to the ‘Page Layout’ tab, click on ‘Print Titles,’ then navigate to the ‘Header/Footer’ tab, and select ‘Custom Header’ to insert the filename using the ‘Insert File Name’ button. Easy, right?

How to Add the Filename to the Header in Excel

In this section, we’ll walk you through the steps to add the filename to the header in Excel. By the end of this tutorial, your Excel spreadsheets will have the filename automatically displayed in the header. Let’s get started!

Step 1: Open Your Excel File

First things first, open the Excel file where you want to add the filename to the header.

Once you’ve opened your Excel file, make sure it’s the correct one you want to work on. This might sound simple, but it’s always a good idea to double-check!

Step 2: Navigate to the ‘Page Layout’ Tab

Click on the ‘Page Layout’ tab at the top of the Excel window.

The ‘Page Layout’ tab is where you’ll find various options for adjusting the layout of your spreadsheet, including headers and footers.

Step 3: Click on ‘Print Titles’

In the ‘Page Layout’ tab, find the ‘Page Setup’ group and click on ‘Print Titles.’

This option allows you to specify rows and columns to repeat on each printed page, but it also gets you to the ‘Page Setup’ dialog box, which is what we need.

Step 4: Go to the ‘Header/Footer’ Tab

In the ‘Page Setup’ dialog box, navigate to the ‘Header/Footer’ tab.

This tab is your go-to place for adding, customizing, and formatting headers and footers in Excel.

Step 5: Select ‘Custom Header’

Under the ‘Header/Footer’ tab, click on the ‘Custom Header’ button.

The ‘Custom Header’ option allows you to create a header that fits your specific needs, including adding the filename.

Step 6: Insert the Filename

Click inside the desired section (left, center, or right) of the header, then click the ‘Insert File Name’ button (this looks like a small file icon).

After you click the ‘Insert File Name’ button, you’ll see a code like &[File] appear in the section you selected. This code will dynamically display the filename.

Step 7: Confirm and Finish

Click ‘OK’ to close the ‘Header’ dialog box, and then click ‘OK’ again to close the ‘Page Setup’ dialog box.

Your file now has its filename in the header! You can confirm this by going to ‘Print Preview’ or simply by checking the header in your worksheet view.

After completing these steps, the filename of your Excel file will appear in the header of each page, making it easier to identify your documents without opening them individually.

Tips for Adding the Filename to the Header in Excel

  • Check Print Preview: Always check ‘Print Preview’ to ensure the filename appears as expected.
  • File Paths: If you want the full file path, use the ‘Insert File Path’ button instead of ‘Insert File Name.’
  • Header Sections: You can place the filename in the left, center, or right section of the header.
  • Formatting: Customize the font, size, and style of the filename text by selecting it and using the formatting options.
  • Templates: Save your file as a template to ensure that all new files automatically include the filename in the header.

Frequently Asked Questions

How do I add the full file path instead of just the filename?

In the ‘Custom Header’ dialog, click the ‘Insert File Path’ button instead of ‘Insert File Name.’

Can I add other information to the header along with the filename?

Yes, you can type additional text before or after inserting the filename code.

How do I remove the filename from the header?

Go to the ‘Custom Header’ dialog and simply delete the &[File] code.

Is it possible to have different headers on different sheets in the same workbook?

Yes, you can customize headers individually for each sheet within the same workbook.

Can I use this method in Excel for Mac?

Yes, the steps are similar in Excel for Mac, though the interface might look slightly different.

Summary

  1. Open your Excel file.
  2. Navigate to the ‘Page Layout’ tab.
  3. Click on ‘Print Titles.’
  4. Go to the ‘Header/Footer’ tab.
  5. Select ‘Custom Header.’
  6. Insert the filename.
  7. Confirm and finish.

Conclusion

And there you have it! Adding the filename to the header in Excel is a small change that can make a big difference in your workflow. It’s a simple yet effective way to keep your files organized and easily identifiable.

Feel free to experiment with different header configurations and explore other potential uses of this feature. Whether you manage a few spreadsheets or hundreds, having the filename in the header can save you time and prevent those “which file is this?” moments. For further reading, check out Excel’s official documentation on headers and footers.

Got any other Excel tips or tricks you swear by? Share them in the comments below! Let’s make working with spreadsheets a breeze for everyone.

Matthew Burleigh
Matthew Burleigh

Matt has been working with WordPress and creating content using this powerful content management system for years. While he has written about many other tech topics, WordPress is one of his favorites.

You can read his full bio here.

Join Our Free Newsletter

iPhone & tech guides

You may opt out at any time.
Read our Privacy Policy

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Pinterest (Opens in new window) Pinterest

Related

More Microsoft Office guides

  • How to Hide Tabs in Excel
  • How to Enable AutoComplete in Excel
  • How to Print an Excel Spreadsheet on A4 Paper
  • How to Insert an Artistic or Decorative Horizontal Line in Microsoft Word
  • How to Remove a Footer in Microsoft Word
See all Microsoft Office guides

Primary Sidebar

Join Our Free Newsletter

iPhone & tech guides

You may opt out at any time.
Read our Privacy Policy

Recent Posts

  • How to Use Safety Check on iPhone
  • How to Schedule an Email in Gmail
  • How to Use Hold Assist on iPhone
  • How to Use the Accessibility Checker in Word
  • How to Use the Journal App on iPhone

Site Info

  • Domain Name - Hostgator
  • Hosting - Cloudways
  • Theme Framework - Genesis
  • Child Theme - Smart Passive Income Pro
  • Site Speed - WP Rocket

Archives

  • November 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • June 2024
  • May 2024
  • December 2023
  • November 2023
  • October 2023
  • November 2022
  • October 2022
  • May 2022
  • July 2020
  • September 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • July 2018
  • December 2016
  • November 2016

Categories

  • Apps & Devices
  • Comments
  • Genesis
  • Getting Started
  • Google
  • Hosting
  • iPhone
  • Jetpack
  • Microsoft Office
  • Navigation
  • Plugins
  • Settings
  • Sidebar
  • Themes
  • Windows & Mac
  • WordPress
  • Writing

Clear, step-by-step answers for iPhone, Office, Google, Windows, Mac and WordPress. Find your problem, follow the steps, get back to what you were doing.

Topics

  • iPhone
  • Microsoft Office
  • Google
  • Windows & Mac
  • Apps & Devices
  • WordPress
  • All guides

WordPress

  • Getting Started
  • Writing
  • Settings
  • Navigation
  • Jetpack
  • Themes

Company

  • Affiliate Disclosure
  • Privacy Policy
  • FAQ
  • About
  • Contact

© 2026 Answer Your Tech. Not affiliated with Apple, Microsoft, Google or WordPress. All trademarks belong to their owners.