To calculate person with 5 best marks out of possible 7

dyanblak

New Member
Joined
Apr 18, 2014
Messages
17
Office Version
  1. 2016
Platform
  1. Windows
Hi there,
I wonder whether anybody can help me with this? I need to calculate a winner for a trophy and it is the person who has the best score for 5 out of up to 8 marks. I have sorted the table by competitor name for a start and then sorted the marks from highest to lowest, but now I am stuck and will have to delete the remaining lower marks for each competitor to find the winner. Is there a formula that I can use to save lots of time? Fingers crossed

eg the table starts like this:

Class CompetitorMarks
GreekAbbie Harrop80
CharacterAbbie Harrop79
ModernAbbie Harrop77
ModernAdam Abraham87
Song and DanceAdam Abraham86
BalletAdam Abraham80
TapAdam Abraham77
CharacterAmy Abbott85
NationalAmy Abbott84
GreekAmy Abbott83
TapAmy Abbott83
ModernAmy Abbott83
Song and DanceAmy Abbott83
BalletAmy Abbott78
gymnastic danceAisha Stalker88
CharacterAisha Stalker87
NationalAisha Stalker87
ModernAisha Stalker86
TapAisha Stalker86
Song and DanceAisha Stalker85
GreekAisha Stalker84
BalletAisha Stalker83

<colgroup><col><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I'm not sure what you want done with competitors who have less than 5 marks. For those I simply summed all their marks. Column D is a "helper" column that you can hide if you want to.
Excel Workbook
ABCDEFG
1ClassCompetitorMarksTieBreakNameBest 5
2GreekAbbie Harrop8080Abbie Harrop236
3CharacterAbbie Harrop7979Adam Abraham330
4ModernAbbie Harrop7777Amy Abbott418
5ModernAdam Abraham8787Aisha Stalker434
6Song and DanceAdam Abraham8686
7BalletAdam Abraham8080
8TapAdam Abraham7777
9CharacterAmy Abbott8585
10NationalAmy Abbott8484
11GreekAmy Abbott8383
12TapAmy Abbott8383
13ModernAmy Abbott8383
14Song and DanceAmy Abbott8383
15BalletAmy Abbott7878
16gymnastic danceAisha Stalker8888
17CharacterAisha Stalker8787
18NationalAisha Stalker8787
19ModernAisha Stalker8686
20TapAisha Stalker8686
21Song and DanceAisha Stalker8585
22GreekAisha Stalker8484
23BalletAisha Stalker8383
Sheet6
 
Upvote 0
Thanks JoeMo,
I am doing something wrong, I think, as I just get zeros in column G, and no names in column F. There are 526 rows in total on my spreadsheet by the way.
CompetitorMarksTie BreakNAMEBest 5
Abbie Harrop8080.000000020
Abbie Harrop7979.000000030
Abbie Harrop7777.000000040
Adam Abraham8787.000000050
Adam Abraham8686.000000060
Adam Abraham8080.000000070
Adam Abraham7777.000000080
Amy Abbott8585.000000090
Amy Abbott8484.00000010
Amy Abbott8383.000000110
Amy Abbott8383.000000120
Amy Abbott8383.000000130
Amy Abbott8383.000000140
Amy Abbott7878.000000150
Aisha Stalker8888.000000160
Aisha Stalker8787.000000170
Aisha Stalker8787.000000180
Aisha Stalker8686.000000190
Aisha Stalker8686.00000020
Aisha Stalker8585.000000210
Aisha Stalker8484.000000220
Aisha Stalker8383.000000230

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
I put the names in column F manually. You could use advanced filter on column A to put a unique list there.
 
Upvote 0
Thanks JoeMo, that's not a problem. Still getting '0' in column G though! Frustrating:confused:
 
Upvote 0
A bit differently interpreted...

ClassCompetitorMarksCompetitorThe 5 Best TotalBest Competitor(s)
GreekAbbie Harrop80 Abbie Harrop Amy Abbott
CharacterAbbie Harrop79 Adam Abraham
ModernAbbie Harrop77 Amy Abbott501
ModernAdam Abraham87 Aisha Stalker434
Song and DanceAdam Abraham86
BalletAdam Abraham80
TapAdam Abraham77
CharacterAmy Abbott85
NationalAmy Abbott84
GreekAmy Abbott83
TapAmy Abbott83
ModernAmy Abbott83
Song and DanceAmy Abbott83
BalletAmy Abbott78
gymnastic danceAisha Stalker88
CharacterAisha Stalker87
NationalAisha Stalker87
ModernAisha Stalker86
TapAisha Stalker86
Song and DanceAisha Stalker85
GreekAisha Stalker84
BalletAisha Stalker83

<COLGROUP><COL style="WIDTH: 94pt; mso-width-source: userset; mso-width-alt: 4465" width=126><COL style="WIDTH: 86pt; mso-width-source: userset; mso-width-alt: 4096" width=115><COL style="WIDTH: 48pt" width=64><COL style="WIDTH: 25pt; mso-width-source: userset; mso-width-alt: 1166" span=2 width=33><COL style="WIDTH: 131pt; mso-width-source: userset; mso-width-alt: 6200" width=174><COL style="WIDTH: 140pt; mso-width-source: userset; mso-width-alt: 6656" width=187><COL style="WIDTH: 105pt; mso-width-source: userset; mso-width-alt: 4977" width=140><TBODY>
</TBODY>

F2, control+shift+enter (CSE), not just enter, and copy down:
Rich (BB code):
=IFERROR(INDEX($B$2:$B$23,SMALL(IF(FREQUENCY(IF($B$2:$B$23<>"",
  MATCH($B$2:$B$23,$B$2:$B$23,0)),Ivec),Ivec),ROWS($F$2:F2))),"")

Ivec is defined using Formulas | Name Manager as referring to:
Rich (BB code):
=ROW(Sheet1!$A$2:$A$23)-ROW(Sheet1!$A$2)+1

G2, CSE and copy down:
Rich (BB code):
=IFERROR(SUM(IF($B$2:$B$23=$F2,
  IF($C$2:$C$23>=LARGE(IF($B$2:$B$23=$F2,$C$2:$C$23),5),
  $C$2:$C$23))),"")

H2,CSE and copy down:
Rich (BB code):
=IFERROR(INDEX($F$2:$F$23,SMALL(IF($G$2:$G$23=MAX($G$2:$G$23),
  ROW($F$2:$F$23)-ROW($F$2)+1),ROWS($H$2:H2))),"")
 
Upvote 0
Hi Aladin,
Thanks for this. I have copied and pasted the formulae as you suggest (I have amended all the refs from 23 to 526 as this is how many rows there actually are in the real spreadsheet). I am not sure about what the IVEC code is - I haven't come across this before, so am not sure where to put it. I notice that your result gives Amy Abbot as the winner, but my manual calculations would suggest that she has a total of 418 for her best 5 marks, whereas Aisha has 434. I wonder whether I have not described the desired outcome well enough? I need to find the winner who has the highest combined marks for their best five dances, if this is possible? Hope you can help.
 
Upvote 0
Hi Aladin,
Thanks for this. I have copied and pasted the formulae as you suggest (I have amended all the refs from 23 to 526 as this is how many rows there actually are in the real spreadsheet). I am not sure about what the IVEC code is - I haven't come across this before, so am not sure where to put it. I notice that your result gives Amy Abbot as the winner, but my manual calculations would suggest that she has a total of 418 for her best 5 marks, whereas Aisha has 434. I wonder whether I have not described the desired outcome well enough? I need to find the winner who has the highest combined marks for their best five dances, if this is possible? Hope you can help.

Nothing wrong with your description. Also, you are right about Aisha.

We need to modify the formula in G2...

Control+shift+enter, not just enter:
Rich (BB code):
=SUM(LARGE(IF($B$2:$B$23=$F2,$C$2:$C$23),
  ROW(INDIRECT("1:"&MIN(5,COUNT(IF($B$2:$B$23=$F2,$C$2:$C$23)))))))

Ivec, as I described in my original post, is a defined name.
Assuming that the data is on Sheet1, activate the Formulas | Name Manager, enter Ivec as name, and enter the following in the Refers to box:
Rich (BB code):
=ROW(Sheet1!$A$2:$A$23)-ROW(Sheet1!$A$2)+1

Here is the exhibit that obtains after the modification of the formula in G2 (partially shown)...

ClassCompetitorMarksCompetitorThe 5 Best TotalBest Competitor
GreekAbbie Harrop80 Abbie Harrop236Aisha Stalker
CharacterAbbie Harrop79 Adam Abraham330
ModernAbbie Harrop77 Amy Abbott418
ModernAdam Abraham87 Aisha Stalker434
Song and DanceAdam Abraham86

<COLGROUP><COL style="WIDTH: 94pt; mso-width-source: userset; mso-width-alt: 4465" width=126><COL style="WIDTH: 86pt; mso-width-source: userset; mso-width-alt: 4096" width=115><COL style="WIDTH: 48pt" width=64><COL style="WIDTH: 25pt; mso-width-source: userset; mso-width-alt: 1166" span=2 width=33><COL style="WIDTH: 131pt; mso-width-source: userset; mso-width-alt: 6200" width=174><COL style="WIDTH: 140pt; mso-width-source: userset; mso-width-alt: 6656" width=187><COL style="WIDTH: 105pt; mso-width-source: userset; mso-width-alt: 4977" width=140><TBODY>
</TBODY>

Here is a workbook that shows all of it:
https://dl.dropboxusercontent.com/u/65698317/dyanblak%20Top%20Performers.xlsx
 
Upvote 0
Thanks JoeMo, that's not a problem. Still getting '0' in column G though! Frustrating:confused:

Sorry, I don't understand why you are getting zeroes if your data layout is identical to what I posted. I'm relieved to see that Aladin and I agree on the winner after his post #8.
 
Upvote 0
Wow, thanks Aladin. I have adapted your spreadsheet example to fit my whole big spreadsheet and it has come up with the correct answer. This will save me so much time at the dance festival that I organise. Up until now I have had to shut myself in a quiet room for half an hour to come up with the result. You are a star! Thank you so much:)
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top