If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
IF statement quandry
I realize that you can only nest up to 7 levels in an IF
statement in Excel. However, I received a spreadsheet recently from a client with the following IF statement and it's boggling my mind because it appears to have way more than 7 nested levels. I'm not looking for another way to compute this, I'm just curious - can anyone help me figure out how many levels are actually nested here? Here it is (take a deep breath): =IF(ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33F33,F33 +1,F33)- E33)+(IF(G33H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER (H33),"NA",(IF(E33F33,F33+1,F33)-E33)+(IF (G33H33,H33+1,H33)-G33)))-(IF(YEAR(D33)2003,IF((IF (ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33F33,F33+1, F33)-E33) +(IF(G33H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER(H33),"NA", (IF(E33F33,F33+1,F33)-E33)+(IF(G33H33,H33+1,H33)-G33))))- I330.02,0.021,0),0)) Pretty horrific, I know. Thanks. |
#2
|
|||
|
|||
IF statement quandry
What you're seeing is several groupings of nested IF
statements. They are separated by "+" and "-". For instance, the first statement contains 3 IFs. =IF(ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33F33,F33 +1,F33)- E33)... Then the user adds on to whatever value this statement returns by starting with: +IF(G33H33,... HTH Jason Atlanta, GA -----Original Message----- I realize that you can only nest up to 7 levels in an IF statement in Excel. However, I received a spreadsheet recently from a client with the following IF statement and it's boggling my mind because it appears to have way more than 7 nested levels. I'm not looking for another way to compute this, I'm just curious - can anyone help me figure out how many levels are actually nested here? Here it is (take a deep breath): =IF(ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33F33,F3 3+1,F33)- E33)+(IF(G33H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER (H33),"NA",(IF(E33F33,F33+1,F33)-E33)+(IF (G33H33,H33+1,H33)-G33)))-(IF(YEAR(D33)2003,IF((IF (ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33F33,F33+1 ,F33)- E33) +(IF(G33H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER(H33),"NA", (IF(E33F33,F33+1,F33)-E33)+(IF(G33H33,H33+1,H33)- G33))))- I330.02,0.021,0),0)) Pretty horrific, I know. Thanks. . |
#3
|
|||
|
|||
IF statement quandry
Thanks!
-----Original Message----- What you're seeing is several groupings of nested IF statements. They are separated by "+" and "-". For instance, the first statement contains 3 IFs. =IF(ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33F33,F3 3+1,F33)- E33)... Then the user adds on to whatever value this statement returns by starting with: +IF(G33H33,... HTH Jason Atlanta, GA -----Original Message----- I realize that you can only nest up to 7 levels in an IF statement in Excel. However, I received a spreadsheet recently from a client with the following IF statement and it's boggling my mind because it appears to have way more than 7 nested levels. I'm not looking for another way to compute this, I'm just curious - can anyone help me figure out how many levels are actually nested here? Here it is (take a deep breath): =IF(ISNUMBER(G33),IF(ISNUMBER(H33),(IF (E33F33,F33+1,F33)- E33)+(IF(G33H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER (H33),"NA",(IF(E33F33,F33+1,F33)-E33)+(IF (G33H33,H33+1,H33)-G33)))-(IF(YEAR(D33)2003,IF((IF (ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33F33,F33+ 1,F33)- E33) +(IF(G33H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER(H33),"NA", (IF(E33F33,F33+1,F33)-E33)+(IF(G33H33,H33+1,H33)- G33))))- I330.02,0.021,0),0)) Pretty horrific, I know. Thanks. . . |
Thread Tools | |
Display Modes | |
|
|