View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default If statement checking list

GS formulated the question :
B Rucks presented the following explanation :
Is there a way to use an If statement to see if a cell value is equal to
any value in the list and return a "yes" if true or "no" if false? The
list is in the same worksheet.


Take a look at the LOOKUP functions in online help. You can use one of those
to check the list range combined with...

IF(NOT(ISERROR(?LOOKUP(...))))


Isabelle's solution is a better choice since it uses less functions.
You could modify it as follows to get the results specified...

=COUNTIF(ListRange,Criteria)0,"Yes","No")

...where ListRange is the address where the list is located, and
Criteria is the value you want to find OR a ref to a cell that contains
the value.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc