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)

3

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

MORE FROM ALLEN

Swapping Two Cells

If you need to swap the contents of two cells in your worksheet, Excel provides a number of ways you can approach the ...

Discover More

Moving and Copying Cells

At the very heart of editing is the ability to move and copy cells in a worksheet. Understanding the differences between ...

Discover More

Adjusting Small Caps Text

If you use small caps text in a document, you know that there are several steps involved in properly formatting the text. ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Updating Links

When you establish links between data on a target worksheet and data on a source worksheet, those links are typically ...

Discover More

Unwanted Hyperlinks

Tired of having Excel convert what you type into active hyperlinks? Here are things you can do to undo Excel's ...

Discover More

References to Hyperlinks aren't Hyperlinks

Make a reference to a hyperlink in a formula, and you may be surprised that the reference doesn't return an active ...

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. 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 three minus 3?

2018-04-10 12:52:09

Willy Vanhaelen

@Alan
The behaviour you describe is indeed a very annoying. it seems to appear in all Office applications. It irritates me every time because it is not logic and prone to errors.

Willy


2018-04-10 02:58:56

Alan Elston

I can't replicate the issue reported by Arlene in a search and find in a spreadsheet either. ( I have tried Excel 2003 , 2007 and 2010 on a few independent versions on different computer instillations)

However I have always observed another slightly strange, or at least inconvenient, behaviour in all my attempts at a search and find in the
Excel VAB Editor Window:
This inconvenient behaviour I see in all those versions of Excel that I have.
I also observe this inconvenient behaviour in Word 2007, both in a search and find
in a document
and also
on a search and find in the Word VBA Editor Window

This inconvenient behaviour is that when hitting the replace with, then the find what is still highlighted and selected. So if I am not careful and start writing immediately after the replace box comes up, then I start overwriting what I am searching for –
So I always must remember to click in the replace box after selecting replace. In all spreadsheet search and replace attempts, the replace box is selected automatically when I hit the replace button. ( I except someone forgot to add that last bit of selection moving software or that last bit of the software does not always work )

Alan Elston



2018-04-09 03:45:38

Richard Price

I can't replicate the issue reported by Arlene either, but there is a somewhat similar issue when repeatedly using Ctrl+H (find and replace), which I believe is consistent. The first time you use it, the insertion point is in the (empty) "Find what" box, but on second and every subsequent occasion it's in the "Replace with" box, with the previous replacement text highlighted.

Presumably there's some reason behind this, but it frequently trips me up. For example, to replace all J10 with K10 I 'd type Ctrl+H J10 Tab K10 Alt+A Enter Esc , which works fine the first time. If at some later point I want to replace all L10 with M10, I would like to type in the same pattern Ctrl+H L10 Tab M10 Alt+A Enter Esc, except that fails because L10 goes into the "Replace with" rather than "Find what", and the Tab highlights the Options button rather than putting the insertion point in "Replace with".


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.