+ Reply to Thread
Results 1 to 2 of 2

Trying to Rank positive numbers in ascending order & negative numbers in descending order

  1. #1
    Registered User
    Join Date
    09-25-2017
    Location
    chicago
    MS-Off Ver
    2010
    Posts
    1

    Trying to Rank positive numbers in ascending order & negative numbers in descending order

    I’m trying to rank Payroll hours % used for my stores and we consider closest to 0 the best, the more you save which leads to a bigger saving % is worse but overspending (which is a negative %) is worst. I've tried this formula in excel but it's not quite what i need.
    =IF(A2>0,(IF(A2=0,"",RANK(A2,$A$2:$A$10,1))),IF(A2=0,"",(IF(A2=0,"",RANK(A2,$A$2:$A$10,0)))-(COUNTIF($A$2:$A$10,0))))
    The ultimate goal is to rank positive numbers in ascending order and negative numbers in descending but After all the positive ones. Here is an example of what i'm currently getting and what i would like to achieve:

    Metrics Current Desired
    Rank Rank
    -2.0% 9 9
    -1.0% 8 8
    0.5% 3 1
    1.0% 4 2
    2.0% 5 3
    3.0% 6 4
    4.0% 7 5
    5.0% 8 6
    6.0% 9 7

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Trying to Rank positive numbers in ascending order & negative numbers in descending or

    Try this and copy down.

    Please Login or Register  to view this content.

+ 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] Formula for making numbers in random order change to ascending order
    By bansche123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2021, 09:18 AM
  2. sorting ascending and descending order
    By beepetark in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-30-2019, 01:10 PM
  3. [SOLVED] Rank in descending order only if positive
    By L.LEE in forum Excel General
    Replies: 1
    Last Post: 03-08-2018, 09:42 PM
  4. [SOLVED] Sorting a list with positive #'s descending and negative #'s ascending
    By adc0991 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-17-2014, 09:23 PM
  5. How to get a column of numbers in ascending order?
    By walrasianxl in forum Excel General
    Replies: 2
    Last Post: 09-14-2010, 08:59 AM
  6. Sorting Numbers in Ascending or Descending Order
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-28-2005, 11:25 AM
  7. [SOLVED] how do I rank negative and positive numbers?
    By Anna in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-05-2005, 08:06 PM

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