+ Reply to Thread
Results 1 to 4 of 4

HELP!! NESTING FUNCTION

  1. #1
    bullandbear1987
    Guest

    HELP!! NESTING FUNCTION

    What do I do to this argument below 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


    =3DIF(AND(C47<0,D47<0),ABS(G47/D47),IF((C47<0),G47/C47+1,G47/D47),IF((,D47<=
    0)=AD,

    G47/D47+1,G47/D47))


  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Add an additional IF statement.

    =IF(AND(D47<0,C47>=0),G47/D47,"")

    I'm not sure where you want it or what you want the result to be if the conditions are not true so I just used "".

    You can also use the SIGN function.

    =IF(AND(SIGN(D47)=-1,SIGN(C47)=1),G47/D47,"")

    HTH

    Steve

  3. #3
    Ron Rosenfeld
    Guest

    Re: HELP!! NESTING FUNCTION

    On 30 Jan 2006 05:50:38 -0800, "bullandbear1987" <[email protected]>
    wrote:

    > What do I do to this argument below 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
    >
    >
    >=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))


    You have some typos in what you posted, but I'm not sure exactly what you are
    trying to do. If you view this in a fixed-width font, you should be able to
    see where I pointed out the typos in the last IF clause.

    =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))
    ^ ^

    Perhaps if you described in words what you are trying to do, we might be able
    to simplify.


    --ron

  4. #4
    Findeo
    Guest

    RE: HELP!! NESTING FUNCTION

    Looking at your formula:
    =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))

    according this formula:

    if c47<0 AND d47<0 then
    ABS(g47/d47)
    else ' so c47>=0 OR d47>=0
    if c47<0 then ' so d47 >=0
    (g47/c47) + 1
    else 'so c47 >= 0
    g47/d47
    endif
    endif

    and the rest of the formula is incorrect (there isn't more conditions for
    last IF).

    I think you need some changes in it:

    if c47<0 AND d47<0 then
    ABS(g47/d47)
    else ' so c47>=0 OR d47>=0
    if c47<0 then ' so d47 >=0
    (g47/c47) + 1
    else 'so c47 >= 0

    '======== NEW
    if d47<0 then 'this case is for c47>=0 AND d47<0
    (g47/d47) ' according you write
    else ' c47>= 0 AND d47 >=0
    ????? ' what you need
    endif
    endif
    endif
    In one formula:
    =IF(AND(C47<0,D47<0),ABS(G47/D47),IF(C47<0,G47/C47+1,IF(D47<0,G47/D47,"???")))

    Hope this helps (more or less).

    Greetings,

    --
    Findeo


    "bullandbear1987" escribió:

    > What do I do to this argument below 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
    >
    >
    > =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))
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1