#N/A in lookup function

  • Thread starter Thread starter trapani81
  • Start date Start date
T

trapani81

Hi

I know this has been posted before but they only refer to VLOOKUP and
not the LOOKUP function.

I have created a function as -

=IF(Avail!I5="off","N/A",LOOKUP(J5,S6:S17,T6:T17))

I am searching availability on another sheet else a time slot is
allocated according to the value in cell J5 (for example). The problem
is when no data is in J5, I get the #N/A error.

How can I avoid this using the LOOKUP function as above (no VLOOKUP
suggestions please..!)

Many thanks!
 
Maybe

=IF(Avail!I5="off","N/A",IF(ISNA(LOOKUP(J5,S6:S17,T6:T17)),"Do something
else",LOOKUP(J5,S6:S17,T6:T17)))


Mike
 
Just use another IF clause, like so:

=IF(Avail!I5="off","N/A",IF(J5="","another
message",LOOKUP(J5,S6:S17,T6:T17)))

Hope this helps.

Pete
 
Back
Top