+ Reply to Thread
Results 1 to 9 of 9

NoobQ: Rank function treats negative values as positive values. Help!

  1. #1
    Registered User
    Join Date
    10-12-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    4

    NoobQ: Rank function treats negative values as positive values. Help!

    I have a very limited but hopefully expanding knowledge using Excel 2013, so please forgive me if I don't understand your reply lol. I'm working with a scorecard to rank salespersons throughout our company & let them know where they stand vs our other locations. I've been using a function like this =IF(_LOC1>0, RANK(O4,O$4:O$33,0), " ") to rank them. It's worked out very well until today. We ran into a snag & I realized that when a salesperson's sold total was negative, Excel was treating it as a positive value & ranked him first. Does anyone know how I can change this formula to make it recognize the (-) on a value? Or do I just need to remember to manually change the negative values & do the math myself? Thank you!!!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: NoobQ: Rank function treats negative values as positive values. Help!

    Post a workbook with sensitive data removed and explain in context.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: NoobQ: Rank function treats negative values as positive values. Help!

    It worked fine for me. Remember that using ,0) means it ranks small to large (I referenced the sort order in M1)...
    L
    M
    1
    Descending -->
    0
    2
    -1
    8
    3
    0
    7
    4
    1
    6
    5
    2
    5
    6
    3
    4
    7
    4
    3
    8
    5
    2
    9
    6
    1


    M2 down contains =RANK(L2,$L$2:$L$9,$M$1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: NoobQ: Rank function treats negative values as positive values. Help!

    Or ascending...
    L
    M
    1
    Asacending --->
    1
    2
    -1
    1
    3
    0
    2
    4
    1
    3
    5
    2
    4
    6
    3
    5
    7
    4
    6
    8
    5
    7
    9
    6
    8

  5. #5
    Registered User
    Join Date
    10-12-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: NoobQ: Rank function treats negative values as positive values. Help!

    Attachment 270698 Not sure if it worked or not. That is pretty much the gist of what information I'm using. Any help will be appreciated! Thank you guys!
    Last edited by lutonoodles; 10-12-2013 at 01:29 PM.

  6. #6
    Registered User
    Join Date
    10-12-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: NoobQ: Rank function treats negative values as positive values. Help!

    There. I think this one will work. Sorry about that!
    Last edited by lutonoodles; 10-12-2013 at 05:18 PM.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: NoobQ: Rank function treats negative values as positive values. Help!

    Thanks for the file.

    I dont see what the problem is, it looks to me to be working perfectly?
    C4=-2530 with a rank of 9 (the smallest)
    C8 = 14 749 with a rank of 1 (the largest)

    Can you point out which rankings you think are wrong please?

  8. #8
    Registered User
    Join Date
    10-12-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: NoobQ: Rank function treats negative values as positive values. Help!

    The places it's not working is for the 'Bedding' and 'Delivery' sections on Sheet 3. See how it ranks the -5,ooo one as Rank 1 in the 'Bedding' And puts the only negative value used in 'Delivery' as Rank 7, even though it is clearly supposed to be Rank 9. It's being screwy with the negatives =P
    Last edited by lutonoodles; 10-12-2013 at 01:47 PM.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: NoobQ: Rank function treats negative values as positive values. Help!

    1. rank on value, not %
    2. I would suggest that you keep the same sequance in your table - value column then rank column

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Rank function ignoring zero and negative values
    By mfortier3 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-12-2013, 05:37 PM
  2. Replies: 8
    Last Post: 07-28-2012, 03:22 PM
  3. Replies: 2
    Last Post: 06-18-2012, 04:26 PM
  4. Replies: 4
    Last Post: 09-26-2005, 06:05 PM
  5. ... Count, <<< Positive Values minus Negative Values >>> ...
    By Dr. Darrell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-08-2005, 09:05 AM

Tags for this Thread

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