+ Reply to Thread
Results 1 to 5 of 5

Ranking with multiple criterion

  1. #1
    Registered User
    Join Date
    04-07-2015
    Location
    Auckland
    MS-Off Ver
    2010
    Posts
    5

    Ranking with multiple criterion

    The data I am working with is quite large but the example attached is just a snippet - In the source data, Col B has 7 different programmes and Col C ranges from 0 - 10.

    I am trying to rank some data based on 2 criterion (Col B & C).

    =COUNTIFS($B$2:$B$153,B2,$C$2:$C$153,">"&C2)+1

    This formula I am using in Col D works but where there are duplicates it rightly ranks them the same number. Unfortunately since there are duplicates, the ranking skips numbers. What formula should I use to rank the duplicates the same and then use the next consecutive number versus skipping?

    Each category has to be ranked separately. e.g. All the sports ranked separately from the Play

    If I filter on the sport programme in the example attached, there are 25 number 1's, the next ranking is 26.. How do I get the formula to disregard the number of duplicates and give me the next rank as 2?

    Please see the data attached spreadsheet.

    Think of it as a race with varying finishing times and you want to rank the competitors on their finish time based on ***. So the first male time would be ranked 1 and so would be the first female time despite the finishing times varying etc. But if there are 2 males ranked number 1, I'd still want the next finish time to be ranked as 2 instead of the common ranking where you skip a number/s.

    Thanks for your time.
    Attached Files Attached Files

  2. #2
    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
    43,986

    Re: Ranking with multiple criterion

    A couple of corrections. Firstly, you had a number of zeros that were stored as text that threw things out. Fixed. Secondly, there were two scores of 5 which you had inadvertantly given the same desired ranking as 6. So the lower rankings in my formula will loook different from your desired result.

    =SUMPRODUCT((C2 < C$2:C$153)/COUNTIF(C$2:C$153,C$2:C$153))+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

  3. #3
    Registered User
    Join Date
    04-07-2015
    Location
    Auckland
    MS-Off Ver
    2010
    Posts
    5

    Re: Ranking with multiple criterion

    Thanks Glenn, but it is still not quite right. The programme Col B is one of the criteria and the other would be the benefit Col D. The third highest score in Sport is a 7 so that would be ranked as 3 but in play their third highest is a 6 which would be ranked 3 as well.

    As I previously suggested Think of it as a race with varying finishing times and you want to rank the competitors on their finish time based on ***. So the first male time would be ranked 1 and so would be the first female time despite the finishing times varying etc. But if there are 2 males ranked number 1, I'd still want the next finish time to be ranked as 2 instead of the common ranking where you skip a number/s.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Ranking with multiple criterion

    You can use this formula in row 2 to get the required rankings

    =SUM(IF(FREQUENCY(IF(B$2:B$200=B2,IF(C$2:C$200>C2,C$2:C$200)),C$2:C$200),1))+1

    confirm with CTRL+SHIFT+ENTER and copy down the column (see attached).

    As per Glenn's comments I converted the whole of column C to numeric and placed the above formula in column F so you can compare against your required rankings
    Attached Files Attached Files
    Audere est facere

  5. #5
    Registered User
    Join Date
    04-07-2015
    Location
    Auckland
    MS-Off Ver
    2010
    Posts
    5

    Post Re: Ranking with multiple criterion

    Super duper...awesome. Thanks Daddylonglegs

+ 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] Ranking using multiple criterion
    By gamefreak in forum Excel General
    Replies: 18
    Last Post: 12-07-2014, 10:22 AM
  2. Ranking 5 criterion
    By gamefreak in forum Excel General
    Replies: 0
    Last Post: 12-02-2014, 04:20 AM
  3. Ranking without zero & ranking on multiple factors
    By Navin Agrawal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-13-2014, 06:05 AM
  4. Find value based on item number (first criterion) and date (second criterion)
    By ivan.stajin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2014, 10:47 AM
  5. [SOLVED] How to Sum on Multiple Criterion
    By Don R in forum Excel General
    Replies: 5
    Last Post: 04-10-2005, 11:06 PM

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