Announcement

Collapse
No announcement yet.

IF Function: Too Many Arguments

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • IF Function: Too Many Arguments

    Hi all,

    Here's my dilemma:

    Code:
    =IF(RIGHT(Matrix,5)="10000",K451*(Y451/365),IF(RIGHT(Matrix,5)="01000",K451+L451*(Y451-(365*2)/365),IF(RIGHT(Matrix,5)="00100",K451+L451+M451*(Y451-(365*3)/365)),IF(RIGHT(Matrix,5)="00010",K451+L451+M451+N451*(Y451-(365*4)/365),IF(RIGHT(Matrix,5)="00001",(K451+L451+M451+N451)+(O451*((Y451-(365*4))/365)))))))
    As you can see, it's a 5x5 matrix and values on this particular cell need to follow the formula seen in the code. The problem is that I can only get to a the third condition (00100) before Excel stops and tells me that I have entered too many arguments into the equation.

    Would it help if I were to do the calculations on another cell and then just reference the equation there?

    For example, I would move the formula:"K451*(Y451/365)" and the other subsequent formulas to other columns and then have the code above choose the proper value off those columns.

    i.e.
    Code:
    =IF(RIGHT(Matrix,5)="10000",Z451,)
    Thanks in advance!

  • #2
    Re: If Statement Too Many Arguments

    You had one to many parentheses after the third statement. Basically, you had a complete if statement nested within other if statements.

    Try this

    Code:
    =IF(RIGHT(Matrix,5)="10000",K451*(Y451/365),IF(RIGHT(Matrix,5)="01000",K451+L451*(Y451-(365*2)/365),IF(RIGHT(Matrix,5)="00100",K451+L451+M451*(Y451-(365*3)/365),IF(RIGHT(Matrix,5)="00010",K451+L451+M451+N451*(Y451-(365*4)/365),IF(RIGHT(Matrix,5)="00001",(K451+L451+M451+N451)+(O451*((Y451-(365*4))/365)))))))

    Comment


    • #4
      Re: If Statement Too Many Arguments

      Ah I see, thanks for spotting the error bryce. Ty also dave for the input, I actually was reading up on that when searching through the forums.

      Seems like it works now. Thank you!

      Comment


      • #5
        Re: If Statement Too Many Arguments

        Can somebody help me with the error in the formula below
        =IF(J3=0,"OK",IF(D3="","Rounding Suspense",IF(M3="UNRT","UNRT/SUSP",IF(M3="SUSP","UNRT/SUSP",IF(K3="Non-Award","Non-Award",IF(L3="PRIV_DONATIONs","Private Donation","",IF(Q3="TRUE","GL/PC" Variance")))))))

        Comment


        • #6
          Re: IF Function: Too Many Arguments

          Hi Judisarga,

          You need to remove ',""' after 'Private Donation'. You have one too many arguments in the 6th IF function.
          Regards,
          Batman.

          Comment

          Working...
          X