0

When referencing to another worksheet/book in Excel, is it always linked to a file on a specific hard drive (absolute) - or can be relative, looking in a certain folder, regardless of whether that folder is on computer A, B, or a cloud?

I’m guessing its probably absolute - though is there any way to change to relative?

I’m looking to design a series of templates with multiple interconnected workbooks, to be hosted on a cloud. Won’t work if the reference values are absolute - so need relative values so when linking to the other workbooks, Excel will be looking in the relative folder.

thanks!!

  • Let me understand: you want the interconnected workbooks to be in the same directory *somewhere*, but you dont know *where*. IOW, they should work together as long as they are in the same folder with each other. Is that what you want? – A.S.H Jan 02 '16 at 02:36
  • aiming to create a ‘template folder’ with three books in it that will be linking to each other, and going to be duplicating / copy & pasting this template folder for several new accounts… want to make sure that the hyperlinks in the duplicates are going to the other books in that same folder, NOT to the original template folder that the books were duplicated from... –  Jan 03 '16 at 12:51
  • Possible duplicate of [How do I make a relative reference to another workbook in Excel?](https://stackoverflow.com/questions/11629633/how-do-i-make-a-relative-reference-to-another-workbook-in-excel) – feetwet Apr 21 '18 at 19:39

1 Answers1

1

For Excel VBA, this will work:

Workbooks.Open FileName:= ThisWorkbook.Path & "YourFileName.xls"

I found it here: Relative instead of Absolute paths in Excel VBA

For Linked Cells In Excel Files (versus Excel VBA): https://support.microsoft.com/en-us/kb/328440

That provides a definition as well as brief explanation if you are having issues.

In general, as long as the files are saved in the same relative location to each other, they will remain link in a relative manner as opposed to absolute.

If the original link relativity is broken, then there will be issues with link relativity (that can be addressed and corrected).

Community
  • 1
  • 1
nfloria
  • 127
  • 1
  • 6
  • The question is about linked cells in Excel, not in VBA code. – A.S.H Jan 02 '16 at 02:35
  • 1
    Ok - in that case, Excel will automatically take care of the relative paths of linked worksheets/books. But if that was the case, this questions shouldn't have had tags for vba and excel-vba. – nfloria Jan 02 '16 at 03:04
  • That is possible, although the wording *"linked"* has a precise meaning. Only the OP can clarify that. – A.S.H Jan 02 '16 at 03:37