Nice one Leo - I like it all being in one. I had gotten there but had to use a
helper table though the data in the helper table may be of use to have as well,
so I'll post it anyway:-
Labels in A1:C1 Name/Scores/Bonus
Names in A2:A30
Scores in B2:B30
Bonus values in G1:G3, largest in G1
E1 =LARGE(B2:B30,1) Largest value
E2 =LARGE(B2:B30,SUM(F1:F2)) 2nd largest value
E3 =LARGE(B2:B30,SUM(F1:F3)) 3rd largest value
F1 =COUNTIF(B2:B30,LARGE(B2:B30,1)) gives number of values
equalling largest
F2 =COUNTIF(B2:B30,LARGE(B2:B30,F1+1)) gives number of values equalling
2nd largest
F3 =COUNTIF(B2:B30,LARGE(B2:B30,F1+F2+1)) gives number of values equalling
3rd largest
C2 =IF(ISNA(VLOOKUP(B2,$E$1:$G$3,3,0)),"",VLOOKUP(B2,$E$1:$G$3,3,0)) and copy
down
This simply creates a table of the top 3 values regardless of how many
duplicates, and then just uses VLOOKUP against that table to match each score
against a bonus if applicable. Reasonably easy to scale up if need be as well.
--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03
----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission
----------------------------------------------------------------------------
Leo Heuser said:
<snip>