SOLVED

IF Formula help

%3CLINGO-SUB%20id%3D%22lingo-sub-1602842%22%20slang%3D%22en-US%22%3EIF%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1602842%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20insert%20the%20following%20formula%20and%20it%20keeps%20coming%20back%20with%20I%20am%20entering%20to%20many%20arguments.%26nbsp%3B%20If%20anyone%20has%20a%20solution%20as%20to%20how%20I%20can%20get%20this%20to%20work%20that%20would%20be%20great.%20%3DIF(B6%3D%22Yes%22%2C(B5*1.25*B21)%2CB7%3D%22Yes%22%2C(B5*1.15*B21)%2C(B21*B5)%3C%2FP%3E%3CP%3EWhat%20I%20am%20trying%20to%20achieve%20is%20-%20if%20cell%20B6%20equals%20yes%20use%20X%20calculation%2C%20or%20If%20B7%20equals%20yes%20use%20Y%20calculation%2C%20otherwise%20use%20Z%20calculation.%3C%2FP%3E%3CP%3EAny%20suggestions%20would%20be%20appreciated%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1602842%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1603081%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1603081%22%20slang%3D%22en-US%22%3EIf%20has%20only%20two%20outcome%20TRUE%20or%20FALSE%3CBR%20%2F%3Eyou%20need%20to%20add%20one%20more%20IF%3CBR%20%2F%3Eso%20your%20formula%20will%20be%20if%20(some%20condition%2C%20True%2C%20Otherwise%20(some%20other%20condition%2C%20True%20do%20something%2C%20False%20do%20something%20else))%3CBR%20%2F%3E%3CBR%20%2F%3E%3DIF(B6%3D%22Yes%22%2C(B5*1.25*B21)%2CIF(B7%3D%22Yes%22%2C(B5*1.15*B21)%2C(B21*B5)))%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1603084%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1603084%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F766438%22%20target%3D%22_blank%22%3E%40JPas06%3C%2FA%3E%26nbsp%3BTry%20this%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(B6%3D%22Yes%22%2C(B5*1.25*B21)%2CIF(B7%3D%22Yes%22%2C(B5*1.15*B21)%2C(B21*B5)))%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1603377%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1603377%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F766438%22%20target%3D%22_blank%22%3E%40JPas06%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20most%20recent%20versions%20of%20Excel%20it%20is%20possible%20to%20use%20an%20IFS%20function%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3D%20IFS(%0A%20%20B6%3D%22Yes%22%2C%20(B5*1.25*B21)%2C%0A%20%20B7%3D%22Yes%22%2C%20(B5*1.15*B21)%2C%0A%20%20TRUE%2C%20%20%20%20%20(B21*B5)%0A%20%20)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EHere%2C%20I%20have%20also%20used%20Alt%2FEnter%20to%20split%20the%20formula%20over%20a%20number%20of%20lines%20to%20aid%20readability.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1606989%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1606989%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3BThank%20you%20Peter%20that%20is%20great%20and%20has%20solved%20by%20problem.%26nbsp%3B%20I%20knew%20it%20would%20be%20a%20simple%20step%20that%20I%20was%20missing.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1606990%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1606990%22%20slang%3D%22en-US%22%3EThank%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F746148%22%20target%3D%22_blank%22%3E%40ramizassaf%3C%2FA%3E%20for%20your%20response%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1607026%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1607026%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F766438%22%20target%3D%22_blank%22%3E%40JPas06%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGo%20straight%20to%20the%20point%26nbsp%3B%20without%20IFs%3CBR%20%2F%3E%3D((1%2BB5*B21*(B6%3D%22Yes%22)*1.25)*(1%2BB5*B21*(B7%3D%22Yes%22)*1.15))-1%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1607120%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1607120%22%20slang%3D%22en-US%22%3E%3CP%3EWow%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F767933%22%20target%3D%22_blank%22%3E%40luthius%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CSPAN%3Ethis%20is%20kinda%20complex%20for%20me!!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
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))

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

best response confirmed by JPas06 (New Contributor)
Solution

@JPas06 

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

@JPas06 

Go straight to the point  without IFs
=((1+B5*B21*(B6="Yes")*1.25)*(1+B5*B21*(B7="Yes")*1.15))-1

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