Questions

# Help with Excel Nested IF Statement

Tags:
Locked

### Help with Excel Nested IF Statement

I am trying to figure out why this formula is not working: It works up uwhen until the 3rd IF statement, but when I nest the 3rd IF statement it is giving me the error: "You have entered too many arguments...". Can you all see anything wrong with the formula? Have I entered to many functions in the formula?

=IF(AND(G2<DATE(2008,8,1),F2<DATE(2008,7,1)),SUM(G2-DATE(2008,7,1))/H2*100,IF(AND(G2>DATE(2008,8,1),F2>DATE(2008,7,1)),SUM(DATE(2008,8,1)-F2))/H2*100,IF(AND(G2>DATE(2008,8,1),F2<DATE(2008,7,1)),SUM(31/H2*100)))

### I think you are using too many "IF" and " AND" functions..

"IF" Function...
Between each argument of the IF function, the comma is used as a separator. The comma is what tells Excel when each argument of IF function ends and the next section begins.

"And" function..
Just a thought. :)

Please post back if you have any more problems or questions.

### Try this.

=IF(AND(G2<DATE(2008,8,1),F2><DATE(2008,7,1)),SUM(G2-DATE(2008,7,1))/H2*100,IF(AND(G2>DATE(2008,8,1),F2>DATE(2008,7,1)),SUM(DATE(2008,8,1),-F2))/H2*100,IF(AND(G2>DATE(2008,8,1),F2<DATE(2008,7,1)),31/H2*100)))

I Changed three things:
--In the true condition of the second if there was a comma missing in front of the -F2.
-- in the final if False condition you do not need the sum() the statement 31/H2*100 is sufficient.
-- The greater than symbol at the end of the formula should be a close parenthisis.

Additionally there is an untested condition where the G2 date is 8-1-2008

### Yupper

It looks like Chris nailed it. it is important to make sure your commas are in place- what was happening was that it didn't see it as nested and you broke the limit for the amount of functions allowed.

-C.W.
http://www.oneclickcommissions.com/excel-statement.html

### mutliple nested IF statements in Excel 2010

Need help with multiple nested IF statements in excel. I am trying to do a tier bonus sales spreadsheet that has if this than this, or if this than this, it is 6 if statements all together.
what i have so far: =IF(G3>0,G3<50,G3*0),IF(G3>50,G3<100,G3*5) but not calculating.

### I think you are using too many "IF" and " AND" functions..

"IF" Function...
Between each argument of the IF function, the comma is used as a separator. The comma is what tells Excel when each argument of IF function ends and the next section begins.

"And" function..
Just a thought. :)

Please post back if you have any more problems or questions.

### Try this.

=IF(AND(G2<DATE(2008,8,1),F2><DATE(2008,7,1)),SUM(G2-DATE(2008,7,1))/H2*100,IF(AND(G2>DATE(2008,8,1),F2>DATE(2008,7,1)),SUM(DATE(2008,8,1),-F2))/H2*100,IF(AND(G2>DATE(2008,8,1),F2<DATE(2008,7,1)),31/H2*100)))

I Changed three things:
--In the true condition of the second if there was a comma missing in front of the -F2.
-- in the final if False condition you do not need the sum() the statement 31/H2*100 is sufficient.
-- The greater than symbol at the end of the formula should be a close parenthisis.

Additionally there is an untested condition where the G2 date is 8-1-2008

### Yupper

It looks like Chris nailed it. it is important to make sure your commas are in place- what was happening was that it didn't see it as nested and you broke the limit for the amount of functions allowed.

-C.W.
http://www.oneclickcommissions.com/excel-statement.html