View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Graesser Mark Graesser is offline
external usenet poster
 
Posts: 3
Default Offset in User Defined Function

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