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

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

I need a formula that returns True or False if a number is found in a specific array?  Register To Reply

2. {=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.  Register To Reply

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

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.  Register To Reply