View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default More Than VLOOKUP()

I need to be able to lookup values in a table that may include errors. For
example in A1 thru B9 I have:

1 Larry
#DIV/0! Rocky
2 Moe
3 Curley
Shep
#N/A Bullwinkle
happiness Boris
#NAME? Natasha
#NUM! Dudley


If J1 contains happiness, then:

=VLOOKUP(J1,A1:B9,2,False)
correctly displays:
Boris

If I enter =0/0 in J1, both J1 and the formula display #DIV/0!.
I want the formula to display:
Rocky

If I put nothing in J1, I want the function to display:
Shep

This is an easy task for a UDF, but I need a non-VBA solution.

Thanks.
--
Gary''s Student - gsnu200909