C
Craig
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(E33>F33,F33+1,F33)-
E33)+(IF(G33>H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER
(H33),"NA",(IF(E33>F33,F33+1,F33)-E33)+(IF
(G33>H33,H33+1,H33)-G33)))-(IF(YEAR(D33)<2003,IF((IF
(ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33>F33,F33+1,F33)-E33)
+(IF(G33>H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER(H33),"NA",
(IF(E33>F33,F33+1,F33)-E33)+(IF(G33>H33,H33+1,H33)-G33))))-
I33>0.02,0.021,0),0))
Pretty horrific, I know.
Thanks.
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(E33>F33,F33+1,F33)-
E33)+(IF(G33>H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER
(H33),"NA",(IF(E33>F33,F33+1,F33)-E33)+(IF
(G33>H33,H33+1,H33)-G33)))-(IF(YEAR(D33)<2003,IF((IF
(ISNUMBER(G33),IF(ISNUMBER(H33),(IF(E33>F33,F33+1,F33)-E33)
+(IF(G33>H33,H33+1,H33)-G33),"NA"),IF(ISNUMBER(H33),"NA",
(IF(E33>F33,F33+1,F33)-E33)+(IF(G33>H33,H33+1,H33)-G33))))-
I33>0.02,0.021,0),0))
Pretty horrific, I know.
Thanks.