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: Simple Relative References in External Links.

Simple Relative References in External Links

by Allen Wyatt
(last updated April 19, 2017)


Mike wonders if there is a way to have links to information in an external workbook use relative references. For instance, if there is a link to a cell in another workbook, it is automatically set to an explicit path, such as c:\fullpath\otherfile.xlsx. It would be better for Mike's purposes if it was not an explicit path, instead using simply otherfile.xlsx. That way he could move files around and have the reference be to an external file that is relative to where my current workbook is located.

There is no real way to do this in Excel. The links are created when the linked file is stored. When both workbooks are open (the one with the link and the one that is the target of the link), the links refer to just the filename. The full path location is only saved when the linked file is saved.

If you want to move the location of files, just open both files and then use Save As to save the files where you want them. Excel will update the links to the proper locations. If you move the files around outside of Excel, however, then the links could easily get messed up. (Some people have reported success by having the source and target workbooks always be in the same folder, but this seems to be more simplistic than what Mike is looking for.)

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7923) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Simple Relative References in External Links.

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. ...


Forcing Input to Uppercase

If you type information into a workbook, you may want to make sure that what you type is always stored in uppercase. ...

Discover More

Using a Numeric Portion of a Cell in a Formula

If you have a mixture of numbers and letters in a cell, you may be looking for a way to access and use the numeric ...

Discover More

Always Opening a Workbook that is Editable

When you send a workbook to a coworker, it can be bothersome if that person has problems using what you created. There is ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Inserting Hyperlinks

Connect your worksheets with other workbooks or with the world of the Internet. The ability to add hyperlinks makes this ...

Discover More

Removing Hyperlinks without a Macro, Take Two

Need to get rid of hyperlinks in a worksheet? Here's an easy way to do it without using a macro.

Discover More

Generating Automatic Links to Audio Files

Need to create links to many filenames on your system? Here are a couple of quick ways to get just the connection you need.

Discover More

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

View most recent newsletter.


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. Maximum image size is 6Mpixels. 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 five less than 7?

2018-02-14 16:36:23


Not sure if this has been noticed yet, however; I have found the links for queries and external data sources do not update when you use 'Save-As' to move workbooks. These are also saved as full paths respective of how the workbooks were opened when the link was made. They can be changed manually by editing the query and selecting the 'Data source settings' tool from the ribbon of the query editor. This method of changing them is much easier than using the 'Advanced Editor' tool in the query editor for each query in the workbook, unless you want to modify each query, one at a time.

2017-04-19 02:49:54


Actually Excel already effectively does this.

Even though Excel displays the link with the full path name it treats some of these as relative depending upon the circumstances. For example I created a file (Parent.xlsx) with links to Child A.xlsx and Child B.xlsx in their own subfolders. The links show as full pathnames but if I copy the files and folders as a group (say from \Temp to \Temp 2) using file explorer (this is critical) then when I open the Temp 2 versions they link to the subfolders of the Temp 2 folder. NB: You must have the excel files closed when doing this.

If however I open the Parent.xlsx in Excel in the \Temp folder and then save as to the \Temp 2 folder then the links to the Child files will point to the \Temp folder version - effectively destroying the hierarchy. However if you open the linked files and save to the new Temp 2 folders then the hierarchy can be re-established.

Both behaviours can be useful but you need to understand when they should be used. I regularly use both depending upon the circumstances. Try on a few test files to get the hang of it.

2014-09-22 23:04:21

Raj Shivsharan

Thanks.... Viswanath

2013-04-23 13:15:45


Actually it can be achieved:

Using =worksheetname() and =Indirect() function, and naming the worksheets in the parent Excel file with the name of the externally referenced Excel file. Each externally referenced excel file were in their own folders with same name. These sub-folders were only to create more clarity.


What I did was as follows:-

|----Column B---------------|----Column C------------|

R2) Parent folder --------> "C:TEMPExcel"

R3) Sub folder name ---> =worksheetname()

R5) Full path --------------> ="'"&C2&C3&"["&C3&".xlsx]Sheet1'!$A$1"

R7) Indirect function-----> =INDIRECT(C5,TRUE)

In the main file, I had say, 5 worksheets labeled as Ext-1, Ext-2, Ext-3, Ext-4, Ext-5. Copy pasted the above formulas into all the five worksheets. Opened all the respectively named Excel files in the background. For some reason the results were not automatically computing, hence had to force a change by editing any cell. Volla, the value in cell A1 of each externally referenced Excel file were in the Main file.

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

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.