+ Reply to Thread
Results 1 to 16 of 16

Problems Breaking Ties In Rank Function

  1. #1
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Problems Breaking Ties In Rank Function

    Hello Everyone,

    I am trying to break ties in the Rank function.

    Example worksheet attached.

    I have an eight digit number (a digit can show up more than once) and determine the rank of the sum of each number. I had the ties broken by whatever digit showed up first.
    In the following example, June 13th row showed 6 digits tied for second place and the tie was broken by the order in which the digit show up in the range.

    On the June 14th row it showed digit 4 and 5 tied with 3 occurrence each (running total for the two days). But digit 4 came in twice that day, and reach a total 3 first before digit 5, but Rank2 shows that digit 5 was ranked first, which should of been digit 4.

    Looking for any help or suggestions trying to get a formula to work.
    Hope I explained the problem correctly, difficult to get the right words out.

    Thanks for any help,

    Mike
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Problems Breaking Ties In Rank Function

    Hi

    Cell Q2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copy down

    Cell Q14
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copy down

    Regard
    micope21
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Problems Breaking Ties In Rank Function

    Pl see attached file.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Problems Breaking Ties In Rank Function

    Hi again

    If you want (#VALUE) remove?

    Cell R2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copy down

    Cell R14
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copy down

    This will give you 0 instead show up #VALUE!

    Regard
    micope21

  5. #5
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Re: Problems Breaking Ties In Rank Function

    Thank you micope21 and kvsrinivasamurthy for you help. Update:
    I changed the digits in F2:M2 and F3:M3 to show that I am not getting correct rank order. Digit 4 and digit 5 have the correct rank but
    for the third rank it's showing digit 6, based on the position for June 14th, when in fact digit 8 showed up twice on June 13th and therefore
    reach the total of 2 first and should be ranked 3rd, not 5th. Not sure how to get that into a formula, I think the POS column is set up wrong,
    not sure if I need more helper columns or not. I know this is complicated but hoping someone can see what result I am looking for.
    I appreciate everyone's help.
    Attached Images Attached Images
    Last edited by windme; 06-22-2014 at 11:49 AM. Reason: detletedforerrors

  6. #6
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Problems Breaking Ties In Rank Function

    Hi

    Okay

    If Digit 8 is higher than 7 or 6 and all on totals 2?
    Then formula need point to total then point to higher Digit if I'm correct??

    Try this
    Cell Q2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copy down

    Cell Q14
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copy down

    Regard
    micope21
    Last edited by micope21; 06-22-2014 at 12:05 PM.

  7. #7
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Re: Problems Breaking Ties In Rank Function

    Hi Micope21,
    The rankings for June 13 are incorrect, digit 5 should be ranked 1st (it reached the total of two first, in the first and second position). and digit 8 should be ranked second.

    On June 14 the top 5 ranks are correct, the digits with a total of one (1,2,3,9) are ranked incorrectly, should be in order digit 2, digit 3, digit 1 and digit 9, based on the order of June 13 and June 14th.

    Hope that helps.

  8. #8
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Problems Breaking Ties In Rank Function

    Hi again

    See the file!

    Regard
    micope21

  9. #9
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Problems Breaking Ties In Rank Function

    Now ...I may have completely misunderstood this. If so, apologies..

    If not in case of a tie, I believe the rank should be based on which number got there first, thereby getting the higher rank.

    With the running total this becomes complex. My reading would be that positions in first row would be 1-8, in second row 9-16, third row 17-24 and so on which would then aid in determining the rank in case tie break...

    See the attached..
    The array A1:H1 and A1:H2 only aid in determining the position number

    Hope this helps..
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  10. #10
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Re: Problems Breaking Ties In Rank Function

    The following are the totals for each digit with the date and the position they reached it.

    Digit 5, total 3, reached it on June 13, position 2, should be ranked 1st
    Digit 4, total 3, reached it on June 14, position 1, should be ranked 2nd

    Digit 8, total 2, reached it on June 13, position 8, should be ranked 3rd
    Digit 6, total 2, reached it on June 14, position 4, should be ranked 4th
    Digit 7, total 2, reached it on June 14, position 8, should be ranked 5th

    Digit 2, total 1, reached it on June 13, position 5, should be ranked 6th
    Digit 3, total 1, reached it on June 13, position 6, should be ranked 7th
    Digit 1, total 1, reached it on June 14, position 2, should be ranked 8th
    Digit 9, total 1, reached it on June 14, position 3, should be ranked 9th

    So the running totals are based on the total, then the first date it reach it and then the position.
    Last edited by windme; 06-22-2014 at 12:36 PM. Reason: clarification

  11. #11
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Problems Breaking Ties In Rank Function

    Hi

    Thank you explain this? Now I got it what you trying to explain?
    Ace_XL just best me lol.
    Ace_XL file is correct Ranking.

    Regard
    micope21

  12. #12
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Re: Problems Breaking Ties In Rank Function

    to ace_xl,

    I think that it is, I goofed, digit 4 should be ranked 1st and digit 5 second.
    I'm going to double check it, thanks.

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

    Re: Problems Breaking Ties In Rank Function

    Ignore me. I missed a post earlier in the thread...
    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

  14. #14
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Re: Problems Breaking Ties In Rank Function

    to ace_xl,

    I think that it is, I goofed, digit 4 should be ranked 1st and digit 5 second.

    I added a third day and adjusted the formulas and it seems to be working correctly.

  15. #15
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Re: Problems Breaking Ties In Rank Function

    Thanks to everyone for your help, this was a tough one. Really appreciate it.

    Mike

  16. #16
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Problems Breaking Ties In Rank Function

    via PM
    I am copying down each day for 50 total days. Would the formula change under POS? it seems like ROW($A$1:$H$1)-1)*8+1*COLUMN($A$1:$A$1)),0),0) would change to
    $H$2, the next day $H$3, etc. but on day 4 i'm receiving N/A error.
    I noticed that under pos (P2) the fourmula $F$2:$M2 = $N14, which is the start of the second day. To add up to 50 days do I adjust the formula in P2 to the start of the next day $P$2?
    The formula for the third batch would be
    =MAX(INDEX(($F$2:$M$3=$N14)*((ROW($A$1:$H$2)-1)*8+1*COLUMN($A$1:$H$2)),0),0)

    The blue highlighted portion should reference the digit i.e col N of your file

    Adapt accordingly for other running totals

+ 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. Breaking ties using vlookup, if, etc.
    By RJR34 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2013, 10:21 PM
  2. How to break ties in the RANK function
    By ducecoop in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-20-2013, 12:38 AM
  3. [SOLVED] RANK - Breaking Ties
    By sachinattri in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-28-2013, 04:32 AM
  4. Breaking ties with rank alphabetically
    By ktms in forum Excel General
    Replies: 7
    Last Post: 11-03-2011, 07:06 PM
  5. Breaking Ties in Ranking
    By Zainuddin Zakaria in forum Excel General
    Replies: 4
    Last Post: 03-05-2006, 04:00 AM

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