+ Reply to Thread
Results 1 to 9 of 9

Trying to use RANK function with multiple parameters

  1. #1
    Registered User
    Join Date
    01-23-2015
    Location
    Calgary, Alberta
    MS-Off Ver
    2007
    Posts
    3

    Trying to use RANK function with multiple parameters

    Hi there

    I'm looking to create a formula that ranks my data based on two parameters and where one of these parameters overrides another. I will write out some background information as I feel like it will help put things into context.

    In the sport of show jumping (with horses) I need to rank horses based on penalties and time. For the purpose of this, penalties over rides time. example, a horse with 4 penalties and a time of 78.256 seconds, will not rank as high as a horse with 0 penalties and a time of 80.256.

    I have columns that give total penalties and time but how do I best rank there using a formula as I need. The number of horses in a set of data can vary.

    Thanks for your help!!!
    Last edited by AshleyWee; 01-23-2015 at 06:43 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Please help! Help with formulas using the "RANK" Function!!!

    You get better help if you add an excel file, without confidential information.

    Please also add the desired (excpected) result.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: Please help! Help with formulas using the "RANK" Function!!!

    To attach a Workbook
    (please do not post pictures or links to worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Please help! Help with formulas using the "RANK" Function!!!

    Look at maximum time expected, let's say it's 3 digits (i.e. never more than 999 seconds).
    Now with your penalties in column B and your time in column C
    In a blank column (let's say F)
    =IF(ISNUMBER(C2), B2*1000+C2,"")
    Then
    Rank based on F
    Does that help?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

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

    Re: Please help! Help with formulas using the "RANK" Function!!!

    Hello AshleyWee, welcome to Excel Forum

    Lets assume you have Penalties in B2:B10 and Times in C2:C10 then try this formula in D2 copied down

    =RANK(B2,B$2:B$10,1)+COUNTIFS(B$2:B$10,B2,C$2:C$10,"<"&C2)

    That will rank on penalties, lowest ranking highest, and effectively use the time as a tie-break between horses with the same number of penalties.
    Audere est facere

  6. #6
    Registered User
    Join Date
    01-23-2015
    Location
    Calgary, Alberta
    MS-Off Ver
    2007
    Posts
    3

    Re: Please help! Help with formulas using the "RANK" Function!!!

    Optimum Time Worksheet.xlsx

    Thank you for everyone's input so far. I have not been able to get it working, yet I feel like it is close. I have attached the worksheet with the data.

    I am trying to get a formula in column AA (Position) which shows the ranks ranks each sequence first by the TOTAL NUMBER OF PENALTIES (column Y) and then by the TIME DIFFERENCE (column Z). I am happy with the how the rest of the sheet is working, just stuck on this part...

    Thank you again everyone

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Trying to use RANK function with multiple parameters

    I think you have to unmerge all merged cells to get this working.

    Maybe another forummember has an alternative.

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

    Re: Trying to use RANK function with multiple parameters

    You should be able to use a version of the formula I suggested, i.e. in AA9

    =IFERROR(RANK(Y9,Y:Y,1)+COUNTIFS(Y:Y,Y9,Z:Z,"<"&Z9),"")

    copy the formula down the column

  9. #9
    Registered User
    Join Date
    01-23-2015
    Location
    Calgary, Alberta
    MS-Off Ver
    2007
    Posts
    3

    Re: Trying to use RANK function with multiple parameters

    Thank you very much daddylonglegs. It works perfectly.

    All the best

+ 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] Rank function using "array IF" formula as ref doesn't seem to work
    By vizzkid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2014, 09:47 AM
  2. [SOLVED] Rank function "tiebreaker"
    By glosos in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-09-2014, 03:14 AM
  3. dragging "rank order" function down, skipping grouped cells
    By theletterh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-04-2012, 06:52 PM
  4. RANK function to GRADE "A","B" students.
    By all4excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-12-2007, 10:22 AM
  5. Need an Alternative to "Rank" function
    By jscully in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-27-2006, 02:01 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