oomeheadhurts
Technical User
Hello, I have very long and complicated formulas dveloping in my cells, and I was wondering if I can write a helper function to handle this.
My stab at the function looks something like
Can anyone tell me what I'm doing wrong cause when I enter
=lookupMatch(table1)
i get a cheeky #value! response from Excel.
My stab at the function looks something like
Code:
Function lookupMatch(name1 As Variant) As Variant
Dim rng1 As Range
rng1.Name = name1
lookupMatch = "=IF(ISERROR(gethyperlink(INDIRECT(""Options!""&ADDRESS(MATCH(INDEX(rng1,B3,1),rng1,0),1,4,TRUE)))),IF(ISBLANK(INDEX(rng1,B3,1)),"""",INDEX(rng1,B3,1)),HYPERLINK(gethyperlink(INDIRECT(""Options!""&ADDRESS(MATCH(INDEX(rng1,B3,1),tblA,0),1,4,TRUE))),IF(ISBLANK(INDEX(rng1,B3,1)),"""",INDEX(rng1,B3,1))))"
End Function
Can anyone tell me what I'm doing wrong cause when I enter
=lookupMatch(table1)
i get a cheeky #value! response from Excel.