Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
carl
 
Posts: n/a
Default IF with OR Question

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.
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default IF with OR Question

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"})

"carl" wrote:

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.

  #3   Report Post  
bpeltzer
 
Posts: n/a
Default IF with OR Question

=if(and(a1=0,a1<=150),"OK",if(and(a1150,a1<=300) ,"Check",if(and(a1300,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

"carl" wrote:

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.

  #4   Report Post  
Max
 
Posts: n/a
Default IF with OR Question

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","")))

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"carl" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Follow-Up (Clarification) to MIN question Odawg Excel Discussion (Misc queries) 4 October 20th 05 04:04 AM
Benefits many people - Question ebgehringer Excel Discussion (Misc queries) 0 October 7th 05 09:22 PM
How do I find and replace a question mark in Excel? Ranpalandil Excel Discussion (Misc queries) 1 September 7th 05 10:20 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM
An easy macro question and one I believe to be a little more diffi TroutKing Excel Worksheet Functions 3 January 18th 05 09:17 PM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"