• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

IF Function question

msexcel

New Member
Hello there,

I have a question about IF function. Here is the arguments I am typing in however the result is not correct. IF(checking<500,"low",if(2000>checking>500,"medium","high")

The problem is to categorize the checking account into three levels, if the amount is less than 500, then the result should show as LOW, if it is between 500 and 2000, then medium, and if the amount is above 2000, the result should be high.

Thanks,
 
IF(checking<500,"low",if(2000>checking>500,"medium","high")

=If(Formula,TRUE,FALSE)

Excel doesn't recognize "checking" it's not a word used. So we start off with:-

if it's >2000, it's "high", if it's >500, it's "medium" otherwise it's "low"
 
You are trying to enter multiple logical arguments into one logical argument with 2000>checking>500
You would need to either nest it with the and function to have more than one logical argument, or do it like chippy did, which is far easier.

Edit: @ Chippy, I was assuming Checking was a named range.
 
To add to what oldchippy has said...
The IF function doesn't handle AND/OR type functions on it's own. If you really wanted to do a structure like above, it would need to be:
=IF(checking<500,"low",IF(AND(2000>checking,checking>500),"medium","high"))
Note that "checking" in this formula would need to be the name of a cell, or XL won't know what you are talking about.
 
Also, be careful when you setup conditions like:
IF(x>500,IF(x<500,...
As that will be exclusive of 500. You probably want one of the conditions to be a >= or <= symbol (greather than or equal to/less than or equal to).
 
Back
Top