IF Formula help

New Contributor

I am trying to insert the following formula and it keeps coming back with I am entering to many arguments.  If anyone has a solution as to how I can get this to work that would be great. =IF(B6="Yes",(B5*1.25*B21),B7="Yes",(B5*1.15*B21),(B21*B5)

What I am trying to achieve is - if cell B6 equals yes use X calculation, or If B7 equals yes use Y calculation, otherwise use Z calculation.

Any suggestions would be appreciated 


6 Replies
If has only two outcome TRUE or FALSE
you need to add one more IF
so your formula will be if (some condition, True, Otherwise (some other condition, True do something, False do something else))


best response confirmed by JPas06 (New Contributor)


On the most recent versions of Excel it is possible to use an IFS function

= IFS(
  B6="Yes", (B5*1.25*B21),
  B7="Yes", (B5*1.15*B21),
  TRUE,     (B21*B5)

Here, I have also used Alt/Enter to split the formula over a number of lines to aid readability.

@Peter Bartholomew Thank you Peter that is great and has solved by problem.  I knew it would be a simple step that I was missing.

Thank you @Ramiz_Assaf for your response


Go straight to the point  without IFs

Wow @Juliano-Petrukio 
this is kinda complex for me!!