Forum Discussion

katie's avatar
katie
Copper Contributor
Jul 07, 2017
Solved

Multiple IF function

I am trying to apply appropriate commissions based on finding "CR" in a column.

 

So far, I have: =SUM((ISNUMBER(SEARCH("CR",D3))*(I3*0.65))) - which if it finds CR in field D3, it multiples field I3 by .65. 

 

I need it to then determine that if CR is not found, to multiply field I3 by 1.

 

Is that possible?

  • Another less straight forward solution:

    =(1-MMULT({0.35,1},COUNTIF(D3,{"*CR*";"*INV*"})))*I3

17 Replies

  • katie's avatar
    katie
    Copper Contributor
    One more problem I just realized... if it finds INV in field D3, to make it come back with a zero?
    • Detlef_Lewin's avatar
      Detlef_Lewin
      Silver Contributor

      Another less straight forward solution:

      =(1-MMULT({0.35,1},COUNTIF(D3,{"*CR*";"*INV*"})))*I3
      • katie's avatar
        katie
        Copper Contributor
        You're a genius! Thank you so much!! Truly, thank you!!
  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Hi

     

    Straight forward:

    =IF(COUNTIF(D3,"*CR*"),0.65,1)*I3

    Less straight forward:

    =(1-COUNTIF(D3,"*CR*")*0.35)*I3

     

    • katie's avatar
      katie
      Copper Contributor
      Thank you so much for the quick reply! Amazing that I have spent hours trying to figure this out! Thank you! :)
    • katie's avatar
      katie
      Copper Contributor
      Thank you, thank you for the quick reply! That is exactly what I needed! :)

Resources