IF with OR Question

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

Guest

I am trying to write a formula that will look at a value and if that value is
between 0 and 150 return "OK", if between 151 and 300. return "Check", or if
between 301 and 500 return "Under"

Thank you in advance.
 
No bounds checking to handle cases where the value is less than 0 or greater
than 500, but, assuming the value is in A1, try

=LOOKUP(1+INT(A1/150),{1,2,3;"OK","Check","Under"})
 
=if(and(a1>=0,a1<=150),"OK",if(and(a1>150,a1<=300),"Check",if(and(a1>300,a1<=500),"Under")))
This doesn't account for anything <0, or >500 (it returns 'False'). If this
gets more involved, you might consider using a vlookup with a table that
indicates each range and its treatment.
--Bruce
 
One way .. try in say, B1:

=IF(A1="","",IF(AND(A1>=0,A1<=150),"OK",
IF(AND(A1>=151,A1<=300),"Check",
IF(AND(A1>=301,A1<=500),"Under","")))
 

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