Forum Discussion
Hyperlink function do not support Dynamic Arrays
Maybe try inserting an @ symbol:
=HYPERLINK(@A1:A3,B1:B3)
To make backward compatible perhaps use a relative name ThisRow:=R (in R1C1 notation):
=HYPERLINK(ThisRow A1:A3,B1:B3)
Note the Function Wizard can provide clues to the behaviour in such cases. Without using an intersection operator one sees arrays in the Friendly name and Result but not Link_Location:
Using bold type for arrays the function could therefore be written as:
HYPERLINK(Link_Location, Friendly_name)
Entering an array in Link_Location results in a nested array which gets truncated by the calc engine.
Compare with a function like CONCATENATE which only shows single value results:
CONCATENATE(Text1,[Text2],...)
Then arrays are handled in the normal way.
Not sure why HYPERLINK has this signature, perhaps it was originally designed to allow for text inputs longer than 255 characters in Excel 2003 versions and prior?
- Andrew PhillipsNov 01, 2022Copper Contributor
lori_m
Wrap the hyperlink function around an index array function.
for example, where SHEETNAMES is an Array of the form $A$1# containing an array of sheet names for the workbook:=HYPERLINK(INDEX(CONCATENATE("#'",SHEETNAMES,"'!A1"),1,XMATCH(SHEETNAMES,SHEETNAMES,0)))
this however wont create the automatic formatting for a hyperlink, you may need a conditional format to achieve this.
I can't answer why this works, but it worked for me (Office 365)- lori_mNov 27, 2022Iron Contributor
That's an interesting observation. For me this version also works fine:
=HYPERLINK(CONCATENATE("#'",SHEETNAMES,"'!A1"))
but replacing the SHEETNAMES range reference with an array such as {"Sheet1","Sheet2","Sheet3"} doesn't preserve spilled links. The INDEX suggestion also doesn't solve the posted question for me i.e. spilling friendly name.