So I will have a list of players (for fantasy baseball) that includes what team they are on and their salary - 3 columns in total. The number of players will range but could be in the 100-238 range. 238 is the max though.
I need to find the top 15 or 10% most expensive players, whichever is higher once we're done drafting. Therefore I will either have 15 players (if my list is <= 150) or will be the 10% once it gets to 155 and higher (since we're rounding).
Since based on my max I know I'll have anywhere from 15-24 players to pick from I had the following formula in a grid and just dragged down 24 rows. Column I is just numbered 1-24.
=IF(OR(COUNTIF($B$2:$B$501,"*") < 150, I3 <= ROUND(COUNTIF($B$2:$B$501,"*") * 0.1,2)),INDEX($B$2:$B$211,MATCH(1,INDEX(($D$2:$D$211=LARGE($D$2:$D$211,ROWS(J$1:J1)))*(COUNTIF(J$1:J1,$B$2:$B$211)=0),),0)),"-")
However, something is wrong as I keep getting duplicate names when I test this out with test data.
Any ideas where I am wrong?