Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Full Path Names in Excel.

Full Path Names in Excel

by Allen Wyatt
(last updated September 22, 2016)

6

When you open a workbook in Excel, the workbook name is displayed in the title bar. At times, it would be nice to display more than a simple workbook name in the title bar. Many people could profit by a way to display a full path name along with the workbook name in the title bar. Unfortunately, Excel does not provide a way to do this easily.

If you only need to know the full path name once in a while, then you can create a very simple macro and assign it to the QAT or a shortcut key. When you run the macro, the information in the title bar for the active window is changed to reflect the full path name. This macro, called ChangeCaption, is as follows:

Sub ChangeCaption()
     ActiveWindow.Caption = ActiveWorkbook.FullName
End Sub

The only drawback to this approach is that whenever you rename your workbook by saving it under a different name, the new file name (and path) are not updated in the title bar unless you rerun the macro.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7850) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Full Path Names in Excel.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Automatically Opening Macro Workbooks when Using a Shortcut Key

Click a button on a toolbar and Excel will go so far as to open a another workbook in order to run a macro associated with ...

Discover More

Missing Fonts in a Letterhead

When you create a document (such as a letterhead) that you want multiple people to use, you need to be concerned with whether ...

Discover More

Getting Rid of Blank Labels in a Filtered Merge

If you are filtering a mail merge in Excel, and you get blank labels in the printout in Word, chances are good that something ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Aligning Cells when Importing from CSV

When you import information from a CSV text file, Excel formats the data according to its default settings. Wouldn't it be ...

Discover More

How Excel Treats Disk Files

Workbooks are loaded from disk files, but workbooks aren't the only type of files that Excel can load. This tip provides a ...

Discover More

Who Has the File Open?

Open a workbook that someone else is working on, and you won't be able to save your changes back into the same file. Wouldn't ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is eight minus 8?

2016-09-24 05:49:32

Michael (Micky) Avidan

@Kevin Scanlon,
Try to add $A$1 to each and every instance of the CELL("filename") segment.
Like that:
...CELL("filename",$A$1)...
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2017)
ISRAEL


2016-09-23 10:37:05

Kevin Scanlon

Getting back to the point of this Tip, the suggestion to use "CELL" falls foul of the fact that this function is a volatile function and hence is re-calculated EVERY time ANY cell is changed in Excel.
This means that a "CELL" based formula located in workbook "A" will incorrectly report that it is in workbook "B" if both workbooks are open in the same instance of Excel and workbook "B" is the last one edited.
Try it and see
Kevin


2016-09-22 11:04:00

Roy

Nothing to do with this great tip, but in the latest version of Outlook if you are sending the sheet you have just worked on you can attach it quickly by just clicking on Attach file. A list of all the recent file worked on appears there.


2016-09-22 09:28:58

Kyle Fabris

I also find the "Document Location" textbox very handy. When you open a workbook, the fully qualified path is displayed. You can then copy/paste this path into any browser windows (e.g. Attach File in Outlook) thereby avoiding having to manually navigate to the file!

You can easily customize the QAT --> All Commands --> Document Location. Unfortunately, the same drawback exists. When you save a workbook, Excel doesn't automatically update the textbox like other MS Office apps do. You have to toggle to another open workbook or toggle to another application then go back to Excel for it to update.

Life is Good!

Kyle


2016-09-22 07:44:09

Michael (Micky) Avidan

@bettie lobato,
You suggestion presents the ActiveSheets name as well.
In order to present the Path and full file name only - try:
=SUBSTITUTE(LEFT(CELL("filename"),FIND("]",CELL("filename"))-1),"[",)
--------------------------
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2017)
ISRAEL


2014-05-31 14:36:29

bettie lobato

Simple way for complete path of file in Excel. On any cell in the file enter:
=cell("filename")


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.