Test if a value is in a range of values

  • Thread starter Thread starter jfrick
  • Start date Start date
J

jfrick

I am trying to write a formula that tests a cell value to see if it matches
values in a range of values and returns either true or false. Any help
would be greatly appreciated.

Josh
 
With the cell to test in A1 and the range to test if it matches in B1:B50,
=IF(COUNTIF(B1:B50,A1)>0,TRUE,FALSE)
Regards,
Aln.
 
Hi Josh,

=AND(A1>=50,A1<=100)

This returns TRUE if the value of A1 lies between 50 and 100, Otherwise it
returns FALSE.

Cheers,
Shane
 
That's good, but what David said is correct, it can be shortened to
=COUNTIF(B1:B50,A1)>0
Regards,
Aln.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top