+ Reply to Thread
Results 1 to 11 of 11

Ranking based on 3 conditions

  1. #1
    Registered User
    Join Date
    01-15-2010
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    7

    Ranking based on 3 conditions

    I have a ranking program that has a tie-breaker situation. It is based on multiple columns on the spreadsheet. Since multiple teams can have ties, I need to use all the conditions to separate them and determine a value based on each tie.

    I have attached my spreadsheet.
    Column C = shows ties
    Column D = rank
    Column E = tie-breaker number

    Trying to Break the tied ranks using a tie-breaker.

    If Column C=2, then look at Col D and find the duplicate. Then look at Col E to find out which number is the lowest. The lower number, subtract 0.5 from ColumnD. If they are equal, add 0 (and we'll go on to tie-breaker #2). If it is the higher number, add 0.5.

    If Col C=3, then look at D to find the other 2 duplicates. Then look at E to find out which number is the lowest. The lower number, subtract 1 from ColumnD. The middle number stays the same, add 0. If it is the higher number, add 1.

    I can't seem to get my formulas to look at each column with IF & AND statements. I also wonder if maybe it can't be done in a formula and needs to be in a macro. Any help is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Ranking based on 3 conditions

    Hi, I have a (rather clumsy, I'm afraid) suggestion. I made separate formulaes for split 2 and 3. (col K and L), with final result in col J.

    If you decide to use my solution, take note that it must be modified somehow to handle when ties =3 have identical values in column E.

    PS I have marked 3 cells red where I believe your calculations are not according to the rules you set up.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Ranking based on 3 conditions

    PPS Without succsess, I tried in all ways I could think of to use RANK in an array-formula. That would have opened up for a much better solution...

  4. #4
    Registered User
    Join Date
    01-15-2010
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Ranking based on 3 conditions

    Thank you for your help!! I appreciate your willingness to take a stab at it. I will try it tonight.

  5. #5
    Registered User
    Join Date
    01-15-2010
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Ranking based on 3 conditions

    Your answer was perfect. I found that I had an error in my original to you. Once I solved that issue, the formulas work perfectly. Thank you so much for all your help. Here is the spreadsheet with the problem solved.

    Thank you very much for your help!!
    Attached Files Attached Files

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Ranking based on 3 conditions

    FWIW, based on the example you could perhaps use a single cell calculation ?

    Please Login or Register  to view this content.
    edit: and given use of XL2007 - another alternative single cell calc

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 09-08-2010 at 04:40 AM.

  7. #7
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Ranking based on 3 conditions

    As far as I can see, the sumproduct-solution doesn't give the right answer when ties = 3 (based on the rules set up in row 18). It does however return results equal to those manualy entered in column H.

    The SUMIFS-solution however, seems to give the results (similar to mine) that follow from the rules set up.

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Ranking based on 3 conditions

    I confess I was just looking to mimic the values in J titled "Correct Answer?" - I suspect I've misinterpreted and as such disregard as nec.

  9. #9
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Ranking based on 3 conditions

    No, you were right DO.
    My comment was based on applying your solutions in the original workbook. I did not realize until after I commented that the example had some errors in column D. Your solution works brilliant in the new and correct workbook. Sorry for the "false alarm":-)

  10. #10
    Registered User
    Join Date
    01-15-2010
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Ranking based on 3 conditions

    In making an Excel 97-2003 compatible version, I used the formula below with great success:
    J3:
    =1+SUMPRODUCT(--($B$3:$B$14+$E$3:$E$14/1000000<$B3+$E3/1000000))
    copied down

    They've decided to add a tie-breaker that includes total points instead of rank. In this case the total points being high would lead to a higher rank with 1 being the highest. Is there a way to alter the formula below to accomodate the higher points value to receive the higher rank? See attached.

    Thanks so much for your help. The program was working great until this change and I can't quite figure out how to reverse it.
    Attached Files Attached Files

  11. #11
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Ranking based on 3 conditions

    If we assume that L will never exceed 1,000,000 (edit: and always exceeds 0) then revise such that the decimal remainder is > the higher the total points value.

    The above in pseudo-terms:

    Please Login or Register  to view this content.
    Applying the logic to the sample file:

    Please Login or Register  to view this content.
    of course you still have duplicity in the above should rank + total points match (you could add a further ROW based increment to make distinct if necessary)
    Last edited by DonkeyOte; 12-28-2010 at 10:04 AM.

+ 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