+ Reply to Thread
Results 1 to 3 of 3

Index Match - Return unique results when Lookup Array contains duplicate values

  1. #1
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    Index Match - Return unique results when Lookup Array contains duplicate values

    Hi All,

    A break from the norm here in that this is not work related. I've just re-read my post and it is far from clear and there are some features on the spreadsheet I've not bothered to explain, so if you need anything clarifying, please just ask.

    Every Friday night I attend a poker tournament with local expats. The tournament hosts around 10 - 20 expats every week and there is a winner each week (the winner of that tournament). In addition to having a weekly winner, the organiser has also decided to start a championship/league table to reward the most consistent players. For example, one particular player may come second every week for the entire year which would mean he wouldn't ever win a weekly prize however, he would more than likely be the best performer on an annual basis, hence the creation of a league to reward the best players at the end of the year.

    The organiser sends through what is, quite frankly, a hideous spreadsheet to show the current league position of that week. Aside from not being aesthetically pleasing, it isn't optimised for automation/efficiency. I volunteered to create a league table for him (attached) however I'm running into some problems. Before I get to the problem, allow me to explain the spreadsheet.

    - The 'Base' tab details the number of points awarded for finishing in a particular position. The number of points for finishing first, second etc. increases if there are a larger number of players.
    - The 'Master' tab; columns B - DC are used to denote the details of the game. Row 4 details the number of the game (first game of the year etc.), row 5 details the date of the game, row 6 details the number of players in that game, and rows 8 downwards specify the position that each player finished in that game (note for games with less than ten people, we only note first second and third. For games with more than 15 people, we note the top 6 finishers only).
    Also on the 'Master' tab we have columns DE - HD which award points to players, based on their weekly finishing position assigned to them in columns B- DC. Points are awarded using an index match to the point table on the 'Base' tab.
    Columns HE - HH denote the number of total points, total wins, total second places and total third places of each player, respectively.
    Columns HJ - HN then attempts to rank each player in the following order; primarily by total points. Where two or more players have the same total points, they are then ranked by number of total wins. If two or more players have the same number of total points and total wins, they they are ranked by total number of second places. If two or mre players have the same number of total points, total wins and total second places, they are then ranked by total number of third place finishes. Column HO then awards players total points based on all of the aforementioned
    - The 'League-Table' tab ranks players based on their total number of points in column HO of the 'Master' tab.

    My problem:
    You can see duplicated names in the 'League Table'. For example, 'Maryse' is both sixth and seventh. This is because she has the same points as Marc (see cells HO14 and HO24 of the 'Master' tab) but the Index Match formula in column E of the 'League Table' cannot distinguish between duplicates. I don't know if it's possible to make it do so.
    Anyway, this led me to realise that there is an eventuality where people can have the same number of points, wins, seconds and thirds. As finishing positions per tournament are only noted from a certain point (for example, for games with less than 10 people, we only note first, second and third positions and anyone finishing fourth is not recognised) it is possible for some people to have matching qualities. Hence, I need a way to distinguish between such players for the purpose of listing in the League Table.

    Can anyone assist?
    Attached Files Attached Files
    Last edited by STUARTXL; 03-13-2017 at 08:42 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Index Match - Return unique results when Lookup Array contains duplicate values

    Assuming Ranking is based on scores in HN

    in HR (so first occurrence of any duplicate will rank highest)

    =IF(HN8>0,HN8-COUNTIF($HN$8:HN8,HN8)*0.0001,"")

    Copy down

    in HS (to get ranking)

    =IFERROR(RANK($HR8,$HR$8:$HR$52),"")

    OR

    To give equal ranking to duplicates

    =RANK.EQ(HN8,$HN$8:$HN$52)
    Last edited by JohnTopley; 03-13-2017 at 09:56 AM.

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

    Re: Index Match - Return unique results when Lookup Array contains duplicate values

    Hi

    Sort for you.
    Master sheet HR8
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy down. How it work start total point then 1st then 2nd then 3rd in correct order!

    League_Table
    I move D8:D51 formula to A8:A51.
    D8
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Copy down.
    E8
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Copy down
    F8
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Copy down and across to 3RD.

    Conditional formatting change all four D7 to A7

    See the file

    Regard
    Attached Files Attached Files
    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".

+ 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 - match 3 input values and return the results from the index
    By t83357 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2016, 07:34 PM
  2. [SOLVED] INDEX/MATCH - duplicate values, need to return all
    By swinksel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-04-2016, 02:19 PM
  3. [SOLVED] Using INDEX MATCH to return unique values for non-unique search term
    By rico_suave in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-03-2015, 01:53 AM
  4. Replies: 4
    Last Post: 05-19-2015, 08:42 PM
  5. Using a LOOKUP with duplicate values - return in an array in one cell
    By mattdh12 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-20-2014, 01:07 PM
  6. Lookup using Index & Match to Return Unique Output
    By apdiego in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2013, 03:45 AM
  7. Replies: 2
    Last Post: 02-02-2013, 05:24 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