hyperlink to a file in a relative path

Hany0

New Member
Joined
Dec 28, 2015
Messages
44
I am using Excel 2003
I use the next method to open a file located in the same folder of the current xls file
right click, hyperlink, choose Existing File or Webpage, choose desired file

but I want to open a file in a folder relative to where the current file is located, so when they are moved to another location, the link can work.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
the path is a folder named Rooms which is a subfolder to the current one where the xls file is located.
the name of the file inside this subfolder is xx.xls
 
Upvote 0
Does this formula work for you?

=HYPERLINK(LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1))-1)&"Rooms\xx.xls")
 
Upvote 0
Yes it works. Thank you very much.
But the link displays the full path of the filename, can it display the filename only?
 
Upvote 0
I would like to mark this reply as it answered my question perfectly.
Hi,
I know this is a very old post. I have a similar situation, but a bit more drilled deeper. I have multiple level folders in the main folder and each level last folder in the path have multiple files. Can I do something similar to your suggestion to create hyperlinks to last file?

Example:

Main_Folder\sub_folder[1 thru 10]\sub_folder[1 thru 10]\file[1 thru 10].pdf

The main xls file with hyperlink resides on the Main_Folder. Each subfolder is iterative until it gets to the .pdf file

Thanks in advance.
 
Upvote 0

Forum statistics

Threads
1,213,496
Messages
6,113,993
Members
448,539
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top