Question

Locked

Help with Excel Nested IF Statement

By dcrackley ·
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)))

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

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.
http://spreadsheets.about.com/od/iffunctions/Excel_IF_Functions.htm

"And" function..
http://spreadsheets.about.com/od/excelfunctions/qt/and_function.htm
Just a thought. :)

Please post back if you have any more problems or questions.
If this information is useful, please mark as helpful. Thanks

Collapse -

Try this.

by Chris910 In reply to Help with Excel Nested IF ...

=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

Collapse -

Yupper

by JNirvaha In reply to Help with Excel Nested IF ...

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

Collapse -

mutliple nested IF statements in Excel 2010

by kaos93 In reply to Help with Excel Nested IF ...

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.

Back to Software Forum
5 total posts (Page 1 of 1)  

Software Forums