Excel nested if

Dell / Precision workstation t74...
July 14, 2009 at 14:02:22
Specs: Microsoft Windows XP Professional, 1.995 GHz / 3325 MB
Hello ,
I am having aproblem in combining two if statements
=IF(AND(M39>0,M39<25000,I39+M39<25000),((M39)*0.39)+M39),IF(AND(M39>0,M39>25000,I39+M39>25000),((25000-I39)*0.39)+M39,M39))

I always get errors ,please I need help to get it work

Thanks


See More: Excel nested if

Report •


#1
July 14, 2009 at 15:06:57
At a minimum, you have an extra parenthesis in your first value_if_true argument:

Remove either (but not both) of these parenthesis and the error will go away:

((M39)*0.39)+M39),
           ^
           ^

((M39)*0.39)+M39),
                ^
                ^

Assuming that removing one of those parenthesis gives you the value you are looking for, you still have more parentheses than needed, which just adds to the confusion. I was able to get the same answers using this:

=IF(AND(M39>0,M39<25000,I39+M39<25000),M39*0.39+M39,
IF(AND(M39>0,M39>25000,I39+M39>25000),(25000-I39)*0.39+M39,M39))

The standard arithmetic Order of Operations means you don't need any parenthesis around things like:

M39*0.39+M39


Report •

#2
July 14, 2009 at 15:13:08
Thank you very much ,I figured out My stupid mistake .

I appreciate your help.


Report •

Related Solutions


Ask Question