Return a hyperlink with hlookup

dmfamman

New member
Joined
Jun 21, 2018
Messages
2
Reaction score
0
Points
0
Excel Version(s)
365
I was wondering if anyone knows how to return a hyperlink with hlookup? Also to go one step farther and first determine if the lookup value is a hyperlink. I have a user defined function that determines whether a cell is a link but in combination with the hlookup function it always returns an error. Any help would be appreciated.
 
What are the UDF and the formula that you have tried? Share them here, please.
 
Thanks so much for looking at this. I'm a sort of shade tree mechanic with excel.

Here is the UDF. It will give me the correct TRUE or FALSE response used alone.

Function IsHyperlink(r As Range) As Boolean
IsHyperlink = r.Hyperlinks.Count
End Function

and here is the formula.

=IF(ishyperlink(HLOOKUP($C$3,Combo!$B$3:$AX$213,A5,FALSE)=TRUE),"YES","NO")
 
HLOOKUP returns a value unfortunately, so try this:
Code:
=IF(ishyperlink(INDEX(Combo!$B$3:$AX$213,A5,MATCH($C$3,Combo!$B$3:$AX$3))),HYPERLINK(hyplnk(INDEX(Combo!$B$3:$AX$213,3,MATCH($C$3,Combo!$B$3:$AX$3))),INDEX(Combo!$B$3:$AX$213,3,MATCH($C$3,Combo!$B$3:$AX$3))),"No")
with an additional UDF:
Code:
Function hyplnk(myCell As Range)
hyplnk = myCell.Hyperlinks(1).Address
End Function
 
Back
Top