Finding Value of a Cell in a Range

W

Wendy L

In cell C1 I want to place a formula that will return a value of 1 if the
value of cell A1 is contained in the range of cells B1:B127 and a value of 0
is the value of A1 is not found in the range of cells B1:B127. All values
are text.
 
A

AlfD

Hi!

Try this formula:

=IF(COUNTIF(B1:B127,A1)>0,"1","0")

If you want the 1 and 0 to be numbers, rather than text, leave out th
four ""s.

Al
 
W

Wendy L

For some reason this didn't work. For example, I can clearly see that the
value of in cell A1 (which happens to be "A.STATUS") is located in the
range B1:B127, which is sorted alphabetically. However, when I enter the
formula you suggested in cell C1, the value that is returned as a result is
"0".
 
W

Wendy L

I'm sorry, the problem wasn't your formula, it was a "user error". Me being
the user, and the error being mine! Once I discovered my error, you solution
worked perfectly. Thanks so much for the help.
 
Top