G
Guest
I am trying to create a user defined function to simplify an INDEX-MATCH lookup
Public Function XLOOKUP(Range, Column, Row
XLOOKUP = Index(Range, Match(Row, Offset(Range, 0, 0, 0, 1), 0), Match(Column, Offset(Range, 0, 0, 1, 0), 0)
End Functio
However, when I use the function I get an error
Compile error
Sub or Function not define
and the first OFFSET function is highlighted
Any help would be appreciated
Thanks
Mark Graesse
(e-mail address removed)
Public Function XLOOKUP(Range, Column, Row
XLOOKUP = Index(Range, Match(Row, Offset(Range, 0, 0, 0, 1), 0), Match(Column, Offset(Range, 0, 0, 1, 0), 0)
End Functio
However, when I use the function I get an error
Compile error
Sub or Function not define
and the first OFFSET function is highlighted
Any help would be appreciated
Thanks
Mark Graesse
(e-mail address removed)