Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports

# Thread: IF Function: Too Many Arguments

1. Member
Join Date
6th 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,)

```

Excel Video Tutorials / Excel Dashboards Reports

2. Long Term Member
Join Date
25th April 2006
Posts
1,195

## 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. ## Re: If Statement Too Many Arguments

4. Member
Join Date
6th 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. I agreed to these rules
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. ## 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.

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

#### 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