Value between 2 numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to compare a number in a cell to a min and max number. If it doesn't
fall between them it is bad if it does it is good.
Example: 2.5 is Min. 5 is Max.
Value is <2.5 or > 5 is "Bad"
2.5 is "Good", 5 is "Good"
Any help is appreciated?
 
One way:

=IF(OR(A1<2.5,A1>5),"Bad","Good")

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
olman said:
I want to compare a number in a cell to a min and max number. If it doesn't
fall between them it is bad if it does it is good.
Example: 2.5 is Min. 5 is Max.
Value is <2.5 or > 5 is "Bad"
2.5 is "Good", 5 is "Good"
Any help is appreciated?

=IF(A1<2.5,"Bad",IF(A1>5,"Bad","Good"))
 
For example, select cell C3 and write
=IF(AND(A1>=2.5,A1<=5),"Good","Bad")
A1 contains the value you want to test.

Ola Sandström


=IF(AND(A1>=B1,A1<=B2),"Good","Bad")
B1 is 2.5
B2 is 5.0
 

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