Search code examples
excelexcel-formulahyperlinkexcel-2003

Excel dynamic hyperlink via formula


I am trying to create a hyperlink from one worksheet to another. The worksheet is large and there are many hyperlinks to places all over the other worksheet so I am trying to do this with a formula that I can copy/paste.

Here's what I have:

=HYPERLINK(CELL("address",INDEX('Test Results'!A:A,MATCH("TestCase-001",'Test Results'!A:A,0))),"TestCase-001")

The URI that it evaluates to is: '[Test Results 1.xls]Test Results'!$A$17, and A17 on the Test Results worksheet is indeed the correct cell to link to. The problem is when I click the hyperlink so I can just to test case details, I get an error saying "Cannot open the specified file", and I'm not sure why since the URI looks correct. Any ideas out there to help me fix this?

Using Excel 2003.


Solution

  • The CELL("address",... function returns in the format '[workbook]worksheet'!cell (as you say)

    However, HYPERLINK expects [workbook]'worksheet'!cell (note the position of the ' marks) where worksheet name includes spaces.

    Simplest answer would be to remove the spaces from the sheet names...