0

Suppose a plan which contains the scores of a mini game sorted by players' name.

enter image description here

How to get the best score for each player?

3 Answers3

2

You can use a combination of Max and If:

In E1, place this formula (and enter by pressing CTRL+SHIFT+ENTER) and drag down: =MAX(IF($A$2:$A$11=$D2,$B$2:$B$11))

(Edit per @ExcelHero's comment, I had $D9).

BruceWayne
  • 22,923
  • 15
  • 65
  • 110
1

You could also sort the list by score in descending order and then just do a vlookup as in

=vlookup(D1, $A$1:$B$11, 2, false)

as vlookup will just return the first match.

Matt Cremeens
  • 4,951
  • 7
  • 38
  • 67
  • Thank you! I'll correct right now. So used to 0-based indices. – Matt Cremeens Aug 19 '15 at 20:34
  • Also, you would want to add false or 0 to the 4th parameter for an exact match. Right now its defaulting to an approximate match and will not always return the appropriate answer. – rwilson Aug 19 '15 at 20:41
  • I thought about that. I guess I felt it not likely to make a difference. I'll make the edit. Thanks. – Matt Cremeens Aug 19 '15 at 20:43
1

Here's a link to a method that is completely formula driven.

https://stackoverflow.com/a/30733387/1188594

It would use the array formula suggested by @BruceWayne, but also uses a formula that can create a distinct list of players.

Community
  • 1
  • 1
Stephen Lloyd
  • 733
  • 8
  • 21