+ Reply to Thread
Results 1 to 8 of 8

Rank function without duplicate ranks

  1. #1
    Registered User
    Join Date
    02-09-2015
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    3

    Rank function without duplicate ranks

    Hi all,

    I'd like to find a way to rank items (in my case "days old") so that if there are two entries ranked "5", the first entry would be 5 and the second would be 6. Right now Ranking function gives me 1,2,3,4,5,5,7,8 etc. because there are two entries marked "5". I don't care which one of the 5 ranks is changed to 6, I just don't want duplicate rankings (rather have 1,2,3,4,5,6,7,8). In some case there might even be 10-20 of the same rankings.

    Any help would be greatly appreciated.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Rank function without duplicate ranks

    Welcome to the forum!

    Have a look here: https://www.extendoffice.com/documen...ique-rank.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-09-2015
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    3

    Re: Rank function without duplicate ranks

    Sorry, I actually tried the formula from the link you sent before: =RANK(Ap4;$AP$4:$AP$1318;0)+COUNTIF($AP$4:AP4;AP4)-1

    However, I'm working with a table and when I try to translate that formula above into the table, I'm lost. I think the issue is just that I'm working with tables, not that the formula is flawed. Any help on how to translate above into a table (with [at[fieldname]] or some such wording?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Rank function without duplicate ranks

    It should make no difference. Attach the workbook.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Rank function without duplicate ranks

    There is a bit of an issue with $A$2:A2 type references and structured tables. You need to adapt slightly!!

    So, this formula:
    =RANK($A2,$A$2:$A$15,0)+COUNTIF($A$2:A2,$A2)-1

    needs to become like this:
    =RANK([@Score],[Score],0)+COUNTIF(INDEX([Score],1):INDEX([Score],ROWS($1:1)),[@Score])-1
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Registered User
    Join Date
    02-09-2015
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    3

    Re: Rank function without duplicate ranks

    Hi Glenn,

    You rock! That worked like a charm! Exactly what I was looking for. Thanks so much!

    (AligW: I'll remember next time to just lead with an attachment. Still learning the path here a bit.)

    Thanks everyone for such prompt and helpful advice and answers!

    Rohan

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Rank function without duplicate ranks

    That's always a good idea!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Rank function without duplicate ranks

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Two stage sorting function which eliminates gaps and sorts duplicate ranks?
    By wdjohnson in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-01-2016, 06:26 PM
  2. RANK bug: same values get different ranks
    By Bernie Deitrick in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 06:05 AM
  3. [SOLVED] RANK bug: same values get different ranks
    By Bernie Deitrick in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 04:05 AM
  4. RANK bug: same values get different ranks
    By Charles Blaquière in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] RANK bug: same values get different ranks
    By Charles Blaquière in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  6. [SOLVED] RANK bug: same values get different ranks
    By Charles Blaquière in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. [SOLVED] RANK bug: same values get different ranks
    By Charles Blaquière in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-16-2005, 02: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