IF statement quandry

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.
 
J

Jason Morin

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(E33>F33,F33+1,F33)-
E33)...

Then the user adds on to whatever value this statement
returns by starting with:

+IF(G33>H33,...

HTH
Jason
Atlanta, GA
 
C

Craig

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(E33>F33,F33+1,F33)-
E33)...

Then the user adds on to whatever value this statement
returns by starting with:

+IF(G33>H33,...

HTH
Jason
Atlanta, GA

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top