+ Reply to Thread
Results 1 to 4 of 4

Relative link or bust

Hybrid View

  1. #1
    Registered User
    Join Date
    11-04-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    15

    Relative link or bust

    Hello everyone, I'm working on a workbook that will be used as part of a project template where information from another workbook in the project template folder is used to make calculations and save time making duplicate entries. I'm trying to figure out how to make Excel quit changing the links to absolute file path, which would mess things up if a new project were started and the links pointed back to the workbooks in the template folder, rather than the workbook in the active project folder. So what I would like to have is these external references use only relative links, and return an error if it encounters an issue, rather than automatically try to update and start pointing to a workbook of the same name in a wrong folder.

    All it needs to do is copy over values entered into certain cells, so it's a very simple operation. I looked through the forum for previous threads on this issue and came up with someone suggesting using the HYPERLINK, and FIND function, but that seems to be intended for opening the referenced workbook to a particular cell?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,152

    Re: Relative link or bust

    When you look at a formula with an external link it will show the entire path even if it is a relative link. For example, if I have a file "Project Master.xlsx" in folder

    C:\Users\Jeff\Project A

    and it has a formula like

    Formula: copy to clipboard
    =[Project Data.xlsx]Sheet1'!$A$1

    which refers to a file in the same folder, when the Project Data file is closed, the formula will show as

    Formula: copy to clipboard
    C:\Users\Jeff\Project A\[Project Data.xlsx]Sheet1'!$A$1

    You see the full path but Excel still considers it to be a relative path.

    Now if I copy both files to a new folder "Project B", the Project Master file will now automatically show the formula as

    Formula: copy to clipboard
    C:\Users\Jeff\Project B\[Project Data.xlsx]Sheet1'!$A$1


    This will not happen if you have the original Project Master file open, and then do a Save As to save it to the new folder. If you do that, it will still point to the original file in the original folder. You have to close the file and copy it.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-04-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    15

    Re: Relative link or bust

    Quote Originally Posted by 6StringJazzer View Post
    Helpful answer
    Ah! This helps tremendously, thank you. I didn't know Excel was so dynamic, I guess you could say, with its links. We take the template folder the Excel workbooks are stored in and copy, paste, and then rename it to the new active project so then as you've explained it should behave how I want it to.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Relative link or bust

    Is this essentially a question about not screwing up a template that is used over and over as a basis for creating unique workbooks.

    i.e open a template and save as a .xlsx or .xlsm?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Quick Formula Bust
    By tori.clemons5 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-11-2020, 05:03 PM
  2. Three columns of relative data - how to link them?
    By surfthesummer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-13-2014, 01:16 PM
  3. I need to make a relative link
    By AlanF51MS in forum Excel General
    Replies: 0
    Last Post: 07-15-2013, 05:17 PM
  4. Relative link with equal interval
    By noman999 in forum Excel General
    Replies: 4
    Last Post: 06-12-2012, 06:20 AM
  5. Paste-Link Relative vs Absolute References
    By Garwayne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2012, 12:35 PM
  6. Relative File Link in Macro
    By jpwolf00 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-26-2005, 10:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1