Forum Discussion
HYPERLINK function returns "Cannot open specified file"
- Nov 14, 2018
=HYPERLINK("#$A$3","Somewhere in the same worksheet")
or
=HYPERLINK("#'ANOTHER SHEET'!$A$3","Somewhere in another worksheet")
if you want a dynamic link in cell A3, put
#A5
then, the hyperlink function
=HYPERLINK($A$3, "Somewhere pointed by Cell A3")
I encountered the same problem and I've noticed that when the sheet name contains the char '-' the function doesn't work properly (file cannot be opened).
This doens't work:
=HYPERLINK("#MR_FIN-0001_SDT_211124234354!B6","MR_FIN_0001_SDT_211124234354")
This version (using underscore between FIN and 0001), works as expected:
=HYPERLINK("#MR_FIN_0001_SDT_211124234354!B6","MR_FIN_0001_SDT_211124234354")
Best regards
Davide
I am trying to use Hyperlink function to access .jpg files in a folder on the computer. I am using Hyperlink because I need the dynamic function to provide the file name. If I just create the link, I get the "Cannot open . . " message. However if I go to a different cell and create a link to that file using the "Insert hyperlink" procedure, that link does access the file. AND if I go back to the cell which uses the Hyperlink function, it now works! The code generated by the Hyperlink function is character for character identical to that generated by the "Insert Hyperlink." For some reason Excel needs help finding the file the first time. Why the identical code can't find it, I can't figure out.
- Patrick2788Oct 15, 2022Silver ContributorIf all the jpgs are in the same folder, you could set a hyperlink base in advanced properties. Creating the links with HYPERLINK would be easier and the links less likely to break.
See: Set the base address for links in a workbook
https://support.microsoft.com/en-us/office/work-with-links-in-excel-7fc80d8d-68f9-482f-ab01-584c44d72b3e- SBailey_72Apr 17, 2023Copper Contributor
Hello, I too am struggling to get the Hyperlink function to work in my workbook with an error that returns "Cannot open specified file". I have followed processes in unchecking the update links on save etc to no avail.
I have numerous sheets that have I want linking to a link within a glossary worksheet so that when the links are updated in the glossary sheet they will automatically update in the worksheets. This is to save time in maintaining and updating numerous worksheets with links to the same link (hope that makes sense).
Worksheets where the HYPERLINK function should open the file that is in the Glossary sheetGlossary sheet (home of the original hyperlink)
- Jamie SutherlandOct 16, 2022Copper Contributor
Patrick2788 thanks for your help.