Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 6 of 6

Thread: IF Function: Too Many Arguments

  1. #1
    Join Date
    7th September 2006
    Posts
    25

    IF Function: Too Many Arguments

    Hi all,

    Here's my dilemma:

    VB:
    =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.
    VB:
    =If(RIGHT(Matrix,5)="10000",Z451,) 
    
    
    Thanks in advance!

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    25th April 2006
    Posts
    890

    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

    VB:
    =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))))))) 
    
    

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,717

  4. #4
    Join Date
    7th September 2006
    Posts
    25

    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!

    Excel Video Tutorials / Excel Dashboards Reports


  5. #5
    Join Date
    1st April 2014
    Posts
    3

    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")))))))

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    8th September 2004
    Location
    Northampton, England
    Posts
    2,802

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Too Many Arguments In IF Function
    By sac1973 in forum EXCEL HELP
    Replies: 6
    Last Post: February 15th, 2008, 11:23
  2. Display Function/Formula Arguments
    By DavidC123 in forum EXCEL HELP
    Replies: 1
    Last Post: October 4th, 2007, 11:14
  3. Too Many Arguments With If Function
    By h4x3r in forum EXCEL HELP
    Replies: 4
    Last Post: January 2nd, 2007, 11:22
  4. Replies: 2
    Last Post: March 9th, 2006, 09:37
  5. unlimited arguments in a function
    By Vurdy in forum EXCEL HELP
    Replies: 2
    Last Post: January 18th, 2005, 09:29

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno