# Getting “too many arguments” with `IF` function

I am new to using Excel (using 2016) and I am trying to make this formula work, but it won't. The formula is `if(c10>0,e9-c10,0,if(d10>0,e9+d10,0))`. When I try to use this formula, it says "too many arguments". The formula works when I take out the value if false i.e., 0s but when I add them it doesn't.

• It says you have two many arguments because whatever you're trying to do, you've structured it in a way that doesn't conform with what the functions expect to see. Edit the question to lay out in words what you're trying to accomplish. Break the formula down into the component pieces of the logic. – fixer1234 Jan 3 '17 at 6:57

The `IF` function takes three arguments:

• logical test
• value if logical test is true
• value if logical test is false

It can be used with only two arguments.  You're calling it with four.

You say it works when you take out the value if false, i.e., 0.  What value do you want the formula to have if `c10>0` is false?

• if you want it to be `0`, why are you saying `if(d10>0,e9+d10,0)`?
• if you want it to be `if(d10>0,e9+d10,0)`, don't throw in the extra `0`.
• thank you so much for responded, i wasn't expecting a reply that quick, see I'm trying to make this sample balance sheet for class and i changed my formula to "=IF(C11>0, E10-C11,IF(C11=0,0,IF(D11>0,E10+D11,IF(D11=0,0))))" and it works now but the problem is it wont do the addition bit, it only subtracts. any idea why? – aimbot.exe Jan 3 '17 at 7:06
• @aimbot.exe Go through the formula with the Evaluate Formula tool. Structure your thoughts. Solve one issue at a time. – teylyn Jan 3 '17 at 7:53
• Your formula works but in case D11<0 it will give False, if you have values in D11 not >=0 you should write the result you want after the 0 in if(D11=0,0,result if D11<0) this part needs change – Sam Jan 3 '17 at 8:13

HI Please try this maybe can halp you:

=IF(E12>=4;"Excellent";IF(E12>=3;"Good";IF(E12>=2;"average";IF(E12>1;"Sufficient";IF(E12>=0;"Insufficient / Fail")))))

Here is an Example: See photo

• Please explain how this answers the question. – DavidPostill Jan 3 '17 at 19:54

First of all, I would like to say thank you to everyone who helped me out. this is a great community and I intend to become a contributing member. Someone suggested evaluating the formula and when I ran the evaluation tool on "=IF(C11>0, E10-C11,IF(C11=0,0,IF(D11>0,E10+D11,IF(D11=0,0))))", it would end up stopping at the c11-0,0 part when c11 would be 0 and would not run through the rest of the formula. this is why it wasn't doing the adding part. when I took that part out it worked perfectly. the formula ended up being "=IF(C11>0, E10-C11,IF(D11>0,E10+D11,IF(D11=0,0))))". for some reason "d11=0,0" didn't matter. thanks again for all your help guys.

• Thanks for closing the loop on your question, and glad you got this figured out. In another day, you will be able to accept your own answer (or another answer that you feel was the key to solving this), by clicking the checkmark next to it. That will indicate that the problem has been solved. – fixer1234 Jan 4 '17 at 4:37