+ Reply to Thread
Results 1 to 7 of 7

Check for scores and display winner or tie

  1. #1
    Registered User
    Join Date
    04-28-2009
    Location
    Pert, WA, Australia
    MS-Off Ver
    2010
    Posts
    24

    Check for scores and display winner or tie

    Hi,

    I'm building quite a complex spreadsheet (for me) and I've come across this issue that I can't quite solve.

    Simple description:

    I want to show who won a game outright, or 'tie' if it was a tie, no matter if there are two, three or four players.

    Example:

    Player 1 has 10 points
    Player 2 has 9 points
    Player 3 has 10 points
    Player 4 is not playing.

    I currently have the sheet set up to state who won, when 4 players are playing by having a cell under the score take the minimum (it's lowest score wins), then having this formula after that, it worked fine:

    =IF(C20=((C16+C17)/2),"Tie",IF(C20=((C16+C18)/2),"Tie",IF(C20=((C16+C19)/2),"Tie",IF((C20=(C17+C18)/2),"Tie",IF(C20=((C17+C19)/2),"Tie",IF(C20=((C18+C19)/2),"Tie",IF(C20=((C16+C17+18)/3),"Tie",IF(C20=((C16+C17+C19)/3),"Tie",IF(C20=((C16+C18+C19)/3),"Tie",IF(C20=((C17+C18+C19)/3),"Tie",IF(C20=((C16+C17+C18+C19)/4),"AS",INDEX(B16:B19,MATCH(MIN(C16:C19),C16:C19,0)))))))))))))

    All was good until we had a game with three players, the fourth player was then shown as the winner as they had 0 points.

    Doing a simple exclude won't work because as you can see my more complex formula is dividing the scores to find out who is the winner or if it is a tie, but in this game the divisions are part of finding out who won.

    I tried adding three more IF formulas with a Count box to tell how many were playing, but this then became too many formulas for excel.

    If anyone can help. I would appreciate it.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Check for scores and display winner or tie

    i think this might be better done with most of the calcs being done outside of your "selection" formula, and then using those answers to return the answer you want. do you have a sample file we could look at please?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Check for scores and display winner or tie

    First if a player is not playing, assign them a score of 999999.
    This will automatically exclude them.
    Gary's Student

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Check for scores and display winner or tie

    I have attached a typical scoring worksheet. Players names are in column A, scores are in column B. B21 contains the winning score. B22 tells the number of winners. B23 identifies if it was a clear single winner or a tie.

    Column C identifies the winner or lists the tied winners.
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Check for scores and display winner or tie

    did you try Jakob's suggestion?

  6. #6
    Registered User
    Join Date
    04-28-2009
    Location
    Pert, WA, Australia
    MS-Off Ver
    2010
    Posts
    24

    Re: Check for scores and display winner or tie

    Hi, thanks for these, I will try this and get back to you in a few hours;

  7. #7
    Registered User
    Join Date
    04-28-2009
    Location
    Pert, WA, Australia
    MS-Off Ver
    2010
    Posts
    24

    Re: Check for scores and display winner or tie

    This was great, thanks for the answer.

    Managed to change above complex formula to this:

    =IF(C21>1,"TIE",INDEX(B16:B19,MATCH(C20,C16:C19,0)))

    Which was much better.

+ 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