I need a formula that returns True or False if a number is found in a specific array.

B

BigDubbe

I need a formula that returns True or False if a number is found in
specific array
 
G

Gbonda

{=IF(SUMIF($C$2:$C$8,E7,$C$2:$C$8)=E7,"true","false")}


$C$2:$C$8 would be the range of numbers. E7 would be the number yo
are lookig for.

Don't forget the array brackets
 
H

Harlan Grove

Gbonda wrote...
{=IF(SUMIF($C$2:$C$8,E7,$C$2:$C$8)=E7,"true","false")}


$C$2:$C$8 would be the range of numbers. E7 would be the number you
are lookig for.

Don't forget the array brackets.

Why not forget them since they're unnecessary?

And if the value sought appeared several times in the array, your
formula returns "false". Whether or not that's what the OP intended is
up to the OP to decide.

If the OP wants True or False boolean values rather than text strings
returned, it'd be easier to use

=COUNTIF(Array,Number)>0

if one or more matches should correspond to TRUE or

=COUNTIF(Array,Number)=1

if one and only one match should correspond to TRUE.
 
Top