+ Reply to Thread
Results 1 to 4 of 4

Negative percent that should be postive

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Negative percent that should be postive

    =ROUND(IF(I17=0,IF(G17=0,0,SIGN(-G17)),IF(G17=0,SIGN(I17),(G17-I17)/ABS(G17))),5)

    so, I17 = 0.00 and G17 = 112.00 (both positive)
    why is this giving me a (negative!!) -100.00%

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Negative percent that should be postive

    its only getting as far as this
    =IF(I17=0,IF(G17=0,0,SIGN(-G17))
    i17=0 and g17 <>0 so return SIGN(-G17)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Negative percent that should be postive

    do you know why?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Negative percent that should be postive

    What you expect? It should return -100%:

    IF(I17=0,IF(G17=0,0,SIGN(-G17))

    I17 = 0 so

    IF(G17=0,0,SIGN(-G17)

    G17 is 100 so it will return sign(-100) and that's -1

    -1 is -100%

+ 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