View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Search range of cells for word & return value for use in formula?

On Oct 20, 8:40*am, Peter Psych Teacher <Peter Psych
wrote:
Using Excel, I want to be able to type in a word and have a formula that is
"looking" at that cell return a value (true or false, yes or no, 1 or 2)
based on whether the word I typed is or is not in an array of cells. *I want
to then be able to use this value in a formula to print a "yes" or "no". *Is
there a simple way to do that?


If A1 is the cell you are typing the word into and B1 is the cell with
the formula "looking" at A1 and C1:L1 is an array of 10 cells each
containing a single word, then you could use...

=IF(A1="","",IF(ISERROR(HLOOKUP(A1,C1:L1,1,0)),"No ","Yes"))

in B1.

Ken Johnson