+ Reply to Thread
Results 1 to 8 of 8

Using the RANK function to rank decimal numbers

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Lenexa, KS
    MS-Off Ver
    Excel 2010
    Posts
    13

    Using the RANK function to rank decimal numbers

    I'm trying to rank numbers that contain decimals, example starting with 100 to be ranked as 1 and the rest in descending order, such as 99.5, 98.7, 80.2, 50.1, etc. There are also more than one of several numbers, such as 3 that are 50.1 as an example. Using the Excel help I get the idea that I should use RANK.EQ as the function and they give an example for tie breakers. but it doesn't seem to work with decimal numbers. Is the RANK function for whole numbers only????? If so, is there any other functions to use to rank decimal numbers. The reason I'm using decimal numbers is because there would be many replicates of the same whole number and the ranking seems to be useless then. Any help would be greatly appreciated.

  2. #2
    Forum Contributor
    Join Date
    07-02-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    197

    Re: Using the RANK function to rank decimal numbers

    Try to use this formula if your values starts in cell A1 and ends in cell A100:

    =IF($A1="","",RANK($A1,$A$1:$A$100,0))

    Copy the formula down
    Last edited by Rambo4711; 10-28-2013 at 09:39 AM.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using the RANK function to rank decimal numbers

    Post several rows worth of sample data, including duplicates, and show us what results you expect.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    08-21-2013
    Location
    Lenexa, KS
    MS-Off Ver
    Excel 2010
    Posts
    13

    Smile Re: Using the RANK function to rank decimal numbers

    Thanks everyone for you quick responses. Unfortunately I have to go to a rather lengthy meeting, till after lunch, so I won't be able to respond with samples, etc. or test the *=IF(......* that you sent to me. I will try to respond back tomorrow morning. Thanks again!

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    Lenexa, KS
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Using the RANK function to rank decimal numbers

    Below is a sampling of the data and the ranking I get with the Function: =RANK.EQ(N5,$N$5:$N$71,0), this is only a sampling of the data. BTW, I tried the above *=IF(......* and got identical results for the rank.
    % Completed Ranking Based on % Completed
    100.0 1
    100.0 1
    100.0 1
    80.0 4
    71.4 5
    69.8 6
    66.7 7
    66.7 7
    60.0 9
    58.3 10
    57.1 11
    55.6 12
    55.0 13
    54.5 14
    54.5 14
    53.2 16
    50.0 17
    50.0 17
    50.0 17
    50.0 17
    50.0 17
    50.0 17
    46.2 23
    42.9 24
    41.7 25
    40.0 26
    40.0 26
    40.0 26
    40.0 26
    37.5 30
    35.0 31
    33.3 32
    Don't know why the data doesn't paste correctly under the column headings. Giving the three 100 values a rank of 1 is okay, but would like the next value of 80.0 to have a rank of 2 and so on down the line for the other same number multiples, instead of skipping to 4 if this is at all possible??? If this is a good as it gets then I can deal with that, just hoping for a better solution.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using the RANK function to rank decimal numbers

    Try this...


    Data Range
    A
    B
    2
    100
    1
    3
    100
    1
    4
    100
    1
    5
    80
    2
    6
    71.4
    3
    7
    69.8
    4
    8
    66.7
    5
    9
    66.7
    5
    10
    60
    6


    This formula entered in B2 and copied down:

    =SUMPRODUCT((A2<A$2:A$10)/COUNTIF(A$2:A$10,A$2:A$10))+1

  7. #7
    Registered User
    Join Date
    08-21-2013
    Location
    Lenexa, KS
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Using the RANK function to rank decimal numbers

    Worked exactly as requested! Thanks Tony!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using the RANK function to rank decimal numbers

    You're welcome. Thanks for the feedback!

+ 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. RANK - Non unique values, contiguous rank required
    By PaulBo in forum Excel General
    Replies: 9
    Last Post: 02-20-2014, 10:34 AM
  2. Formula to Rank and populate values base don Rank
    By Excel Dumbo in forum Excel General
    Replies: 3
    Last Post: 10-09-2012, 02:02 AM
  3. RANK, duplicate ranking but no gaps in rank
    By arron laing in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-06-2012, 07:15 AM
  4. Weighted rank- if duplicates rank the average
    By vlady in forum Excel General
    Replies: 3
    Last Post: 02-28-2012, 09:17 PM
  5. Replies: 1
    Last Post: 08-15-2005, 05:05 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