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 All, I have created an interactive workbook however keeping getting an error as above (cannot open the specified file)
The hyperlink I have is: =HYPERLINK("["&Setup!$E$6&"]'Employee ("&E8+1&")'!E8","next employee ("&E8+1&") >>")
Essentially what should happen when I click on it is that it will go to the next empoloyee's data or a previous employees data.
Any help would be appreciated, thank you!
- DaeteNov 24, 2021Copper Contributor
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
- FlipB045Oct 15, 2022Copper Contributor
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