ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   HOW MANY IF STATEMENTS CAN YOU HAVE IN ONE FORMULA? (https://www.excelbanter.com/excel-discussion-misc-queries/89114-how-many-if-statements-can-you-have-one-formula.html)

bvehslage

HOW MANY IF STATEMENTS CAN YOU HAVE IN ONE FORMULA?
 
I have nine conditions I want the IF statement to recognize, but when I enter
the formula I get an error after the 8th condition.
Any help would be greatly appreciated.

Miguel Zapico

HOW MANY IF STATEMENTS CAN YOU HAVE IN ONE FORMULA?
 
You can only use 7 nested IF. There are other options, like CHOOSE, VLOOKUP
or MATCH/INDEX that may fit in your particular case, check the help for those
functions as that may give you ideas.

Hope this helps,
Miguel.

"bvehslage" wrote:

I have nine conditions I want the IF statement to recognize, but when I enter
the formula I get an error after the 8th condition.
Any help would be greatly appreciated.


bj

HOW MANY IF STATEMENTS CAN YOU HAVE IN ONE FORMULA?
 
You can actually have quite a few. While you can only have 7 nested if
statements, you can format you equation to unnest the ifs in most occurances
for example
=if(a12,5,if(a10,3,1) has two levels of ifs

while
=if(a12,5,0)+if(and(A10,A1<=2),3,0) and if(A1<=0,1,0)
will give the same answer with one level of if staements.

There are multiple other equations which will give the same answer, but will
not be hit by the 7 nested limit.

"bvehslage" wrote:

I have nine conditions I want the IF statement to recognize, but when I enter
the formula I get an error after the 8th condition.
Any help would be greatly appreciated.



All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com