A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF statement quandry



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 11:37 AM
Craig
external usenet poster
 
Posts: n/a
Default 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  
Old May 26th, 2004, 11:54 AM
Jason Morin
external usenet poster
 
Posts: n/a
Default 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  
Old May 28th, 2004, 06:15 PM
Craig
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.