Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
WA WA is offline
external usenet poster
 
Posts: 37
Default Multiple IF statements in equation

Hello,

I have this simple equation in excel where I have tested the individual
segments - I know it works, but when I put it into excel, it tells me there's
an error. If anyone has ideas, let me know - Thanks.

Below is the equation

=IF (C570, IF(C590, ((C59/C57)^(0.5))-1, IF (C57<0, IF(C59<0,
(((C59/C57)^(0.5))-1)*-1, IF(C57<0, IF(C590, (((ABS(C57) + ABS(C57) + C59)/
ABS(C57) ) ^0.5)-1, IF(C570, IF(C59<0, ((((C57 + C57 + ABS(C59)) /C57) ^0.5)
-1) *-1, ""))))))))
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default Multiple IF statements in equation

If you are in Excel 2003 or earlier, you have too many levels of
parentheses; they are nested too deeply. You need to rewrite the
formula such that it uses few levels of nested parentheses or you need
to split the formula in two (or more) cells.

Excel 2007 supports up to 64 levels of parents.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Fri, 29 Jan 2010 12:54:01 -0800, WA
wrote:


=IF (C570, IF(C590, ((C59/C57)^(0.5))-1, IF (C57<0, IF(C59<0,
(((C59/C57)^(0.5))-1)*-1, IF(C57<0, IF(C590, (((ABS(C57) + ABS(C57) + C59)/
ABS(C57) ) ^0.5)-1, IF(C570, IF(C59<0, ((((C57 + C57 + ABS(C59)) /C57) ^0.5)
-1) *-1, ""))))))))

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Multiple IF statements in equation

If you are using Excel 2003, it looks as if you've exceeded the limit on
nesting level (7).

If you use Excel 2007 to avoid that limit, it looks as if much of the
formula is unreachable. You need to look at it a stage at a time and see
for each IF condition which parts of the formula are executed if the
condition is met, and which if the condition is not met. Your first IF test
is for C570, and there is no part which is executed if that condition is
not met. Hence your 3rd IF test, for C57<0, is pointless because you are
still in the part which is only executed if C570. Similarly at other
stages of the formula breakdown. If you say you know it works, I think you
might be confusing yourself. Look at it again.

Perhaps what you wanted was something like:
=IF(C570,IF(C590,((C59/C57)^0.5)-1,
IF(C59<0,((((C57+C57+ABS(C59))/C57)^0.5)-1)*-1, "")),
IF(C57<0,IF(C59<0,(((C59/C57)^0.5)-1)*-1,
IF(C590,(((ABS(C57)+ABS(C57)+C59)/ABS(C57))^0.5)-1, "")), "")) ?
--
David Biddulph

"WA" wrote in message
...
Hello,

I have this simple equation in excel where I have tested the individual
segments - I know it works, but when I put it into excel, it tells me
there's
an error. If anyone has ideas, let me know - Thanks.

Below is the equation

=IF (C570, IF(C590, ((C59/C57)^(0.5))-1, IF (C57<0, IF(C59<0,
(((C59/C57)^(0.5))-1)*-1, IF(C57<0, IF(C590, (((ABS(C57) + ABS(C57) +
C59)/
ABS(C57) ) ^0.5)-1, IF(C570, IF(C59<0, ((((C57 + C57 + ABS(C59)) /C57)
^0.5)
-1) *-1, ""))))))))



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup equation on multiple tabs bongiman Excel Discussion (Misc queries) 7 January 28th 10 11:44 PM
Vlookup equation for multiple tabs bongiman Excel Discussion (Misc queries) 1 February 10th 09 03:59 PM
Multiple Fonts in Excel Equation HM Excel Worksheet Functions 1 August 5th 08 08:28 PM
graph multiple superposition equation BeIzebu69 Charts and Charting in Excel 2 December 29th 06 06:03 PM
Is there an equation in Excel to use multiple if then statements? Cody5 Excel Discussion (Misc queries) 2 January 10th 06 09:02 PM


All times are GMT +1. The time now is 03:52 PM.

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

About Us

"It's about Microsoft Excel"