+ Reply to Thread
Results 1 to 6 of 6

RANK formula cannot rank duplicates

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    17

    RANK formula cannot rank duplicates

    Hi all,

    I have to rank a table of figures which some happen to be duplicates. I used RANK function and it would rank the duplicates as the same.

    I wish to have it rank by alphabetical value when the figures happen to be duplicates, but this is seriously splitting my skull... Hope the experts here can assist in this.

    I have attached a sample. Thanks alot guys!

    Lim
    Attached Files Attached Files
    Last edited by JBeaucaire; 10-12-2012 at 01:23 PM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Help! RANK formula cannot rank duplicates!

    hi Lim, try:
    =IF(OR(E4="",E4=0),"",RANK(F4,$F$4:$F$27)+COUNTIF($F$4:F4,F4)-1)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    09-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Help! RANK formula cannot rank duplicates!

    Hi benishiryo,

    It works perfectly! thanks a million!
    I have a question. I understand your formula for this,=IF(OR(E4="",E4=0),"",RANK(F4,$F$4:$F$27)
    but i really cannot understand this part, COUNTIF($F$4:F4,F4)-1

    Please would you explain it to me how this part really works? Sorry to bother you again.

    Lim

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help! RANK formula cannot rank duplicates!

    It's counting how many OTHER times this particular rank has happened ABOVE this row. It will add what that count is to this rank, minus one, and the result is the "skipped" ranks get filled in by this additional math.

    Click the cell and use the Evaluate Formula function to watch the formula unfold, should make it clearer.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    09-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Help! RANK formula cannot rank duplicates!

    thank you so very very much...

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: RANK formula cannot rank duplicates

    I have marked this thread solved for you.
    In the future please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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