Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2006

Tip: Looking for answers? Try searching our database.

HELP!!! How to Nest AND OR functions   PART II

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bullandbear1987 - 27 Jan 2006 18:02 GMT
Ok, so here was my original problem:

I am attempting to nest the and or functions.
I would like the argument to state:

IF C47 and D47 are negative... take the absolute value of g47/d47
IF C47 or D47 are negative.... take g47/c47+1
IF C47 and D47 are not negative... take g47/d47

Here is what i have written.... can someone please help?????? IT IS
GIVING ME ERRORS

=IF(AND(C47,0,d47<0),abs(g47/d47),OR(C47<0,D47<0),(G47/C47+1),(G47/D47))

---------------------------------------------------------------------------------------------------------------------------------------
We were able to fix that with:
=IF(AND(C47,0,d47<0),abs(g47/d47),IF(OR(C47<0,D47<0),(G47/C47+1),(G47/D47))

I have one more question.
What do I do to this argument if when d47 is negative but c47 is
positive, how can I add it so that if this is the case........ take
g47/d47

Here is what i wrote with error again

=IF(AND(C47<0,D47<0),ABS(G47/D47),IF((C47<0),G47/C47+1,G47/D47),IF((,D47<0),g47/d47+1,g47/d47))
Mika - 27 Jan 2006 19:28 GMT
fellow trader,

the general structure for nested if is:

if( cond1, do A, if(cond 2, do B, if (cond 3, do C,if (....
You can add up to 6 if , i think.

So in my previous reply replace "nothing" with:
...if(and(d47<0,c47>0),g47/d47,"newnothing" and close with the right
number of ).

Good luck with that backtesting
Bob Phillips - 27 Jan 2006 21:04 GMT
=IF(AND(C47<0,D47<0),ABS(G47/D47),IF(OR(C47<0,D47<0),G47/C47+1,G47/D47))

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

> Ok, so here was my original problem:
>
[quoted text clipped - 12 lines]
> ---------------------------------------------------------------------------------------------------------------------------------------
> We were able to fix that with:

=IF(AND(C47,0,d47<0),abs(g47/d47),IF(OR(C47<0,D47<0),(G47/C47+1),(G47/D47))

> I have one more question.
> What do I do to this argument if when d47 is negative but c47 is
> positive, how can I add it so that if this is the case........ take
> g47/d47
>
> Here is what i wrote with error again

=IF(AND(C47<0,D47<0),ABS(G47/D47),IF((C47<0),G47/C47+1,G47/D47),IF((,D47<0),
g47/d47+1,g47/d47))
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.