+ Reply to Thread
Results 1 to 9 of 9

Rank function with multiple criteria

  1. #1
    Registered User
    Join Date
    10-27-2015
    Location
    Fairford, UK
    MS-Off Ver
    Pro + 2016
    Posts
    5

    Rank function with multiple criteria

    Hello...first post so be gentle!
    I am a paraglider pilot and want to set up an automated rank sheet of the paragliders I have flown showing which has flown most. In the simplified example (attached) I have used the rank and countif functions to rank the data by hours. However, this assigns duplicated places solely on their position in the list. I am trying to do a better job with tied results using the next column which shows how many flights the paraglider has done. It is easy to do this using data>sort> and using different levels. However, this does not seem to be immediately possible automatically using the RANK function.

    Can anyone help or point me in the right direction? Thank you!
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Rank function with multiple criteria

    Hi chris and welcome to the forum,

    Creating a simple helper column where it is hours plus flights divided by 100 solves this problem. See the attached.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    10-27-2015
    Location
    Fairford, UK
    MS-Off Ver
    Pro + 2016
    Posts
    5

    Re: Rank function with multiple criteria

    Thank you Marvin. Your very elegant & simple answer neatly solves the problem I posed. However, it doesn't actually solve the unsimplified problem! With more complex data it does not work. I need to rank the data primarily by column C and then by Column D if a tie exists. Merging the data doesn't do that.

  4. #4
    Registered User
    Join Date
    10-27-2015
    Location
    Fairford, UK
    MS-Off Ver
    Pro + 2016
    Posts
    5

    Re: Rank function with multiple criteria

    Ok, all sorted now, thanks to Marvin. I just needed to adjust his "helper" function so as not to interfere too much with the data:
    =(c2*100)+d2/1000

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Rank function with multiple criteria

    OK then try this...

    Sort by column D and then C. Type in rank numbers in colum A. No formulas needed.

    Can you explain why my first method doesn't work?

  6. #6
    Registered User
    Join Date
    10-27-2015
    Location
    Fairford, UK
    MS-Off Ver
    Pro + 2016
    Posts
    5

    Re: Rank function with multiple criteria

    Hello again Marvin,

    Your last suggestion is not an automatic function, unless I'm misunderstanding you.

    Your solution alters the data quite a lot and produces a rank that isn't always based on column C first. My slight adaptation reduces the importance of the tie breaker addition so doesn't alter the primary criterion. I've attached a bit more of my spreadsheet so you can see for yourself.

    Anyway, it's solved now and all down to you, so thank you for your time!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-27-2015
    Location
    Fairford, UK
    MS-Off Ver
    Pro + 2016
    Posts
    5

    Re: Rank function with multiple criteria

    I should add that in the final version, columns E to I are hidden.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Rank function with multiple criteria

    Glad to hear you have a solution you can work with.
    You are correct that the non-formula method needs to sort the data twice. After the second sort (in Col C) the data should be in rank order. Then you will need to manually (or VBA) put in the rank numbers.

    Hope we've helped.

  9. #9
    Registered User
    Join Date
    02-02-2014
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    37

    Re: Rank function with multiple criteria

    This should work without a helper column.

    Please Login or Register  to view this content.
    Enter in cell A4 on your original spreadsheet then drag down. I've tested it against your most recent attachment and it produces the same results.

+ 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] Index Match Rank with Multiple Criteria
    By Blake 7 in forum Excel General
    Replies: 9
    Last Post: 12-04-2014, 10:44 AM
  2. Replies: 6
    Last Post: 10-10-2014, 01:56 AM
  3. rank according to multiple criteria
    By melvil in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-11-2014, 08:21 AM
  4. [SOLVED] Rank with multiple criteria (missing ranks)
    By SofaBoy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2013, 10:41 AM
  5. [SOLVED] Rank function, based on 2 criteria / columns
    By Hein in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2013, 11:34 PM
  6. Rank maximum based on multiple criteria
    By nasman in forum Excel General
    Replies: 1
    Last Post: 04-09-2012, 12:22 AM
  7. Excel 2007 : Problem - Rank multiple criteria using SUMPRODUCT
    By josemartillo10 in forum Excel General
    Replies: 4
    Last Post: 02-23-2011, 03:37 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