Getting "too many arguments" with `IF` function

27,512

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.
Share:
27,512

Related videos on Youtube

aimbot.exe
Author by

aimbot.exe

Updated on September 18, 2022

Comments

  • aimbot.exe
    aimbot.exe almost 2 years

    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.

  • aimbot.exe
    aimbot.exe over 7 years
    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?
  • teylyn
    teylyn over 7 years
    @aimbot.exe Go through the formula with the Evaluate Formula tool. Structure your thoughts. Solve one issue at a time.
  • Sam
    Sam over 7 years
    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
  • DavidPostill
    DavidPostill over 7 years
    Please explain how this answers the question.
  • fixer1234
    fixer1234 over 7 years
    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.