Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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

![]() |
use .txt with or without ...
|
Excel If Statement
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |