excelexcel-formulahyperlinkworksheet

excel - hyperlink to sheet based on cell value


I am trying to hyperlink to a worksheet based on a cell value which contains the sheet name. I have gotten it to mostly work using =HYPERLINK("#" & C3 & "!A1", 1, where C3 contains the sheet name.

This works well unless the sheet name has a hypen in it. Any suggestions on how to work around this would be appreciated

Cheers


Solution

  • All you need is to single quote the sheet name

    =HYPERLINK("#'" & C3 & "'!A1", 1)