How to get the average using the best x scores from a list of y performances

Ratfink52

New Member
Joined
Aug 13, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
In a similar fashion of calculating a golf handicap by using the say the best 8 scores from your last 10, I need to do this for a database of performances for another sport where each player has a different number of games in the same period. So I want to drop the say two worst performance from the last x number of games regardless of the length of time elapsed from their first game to the last. The database is typically date (of game), name, score. From this I extract a pivot table of the average scores, but want the average to be the average of the best x scores from the most recent y games.

Help please!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hello, based on your description it could be something like this but we would need to see the relevant data:

Excel Formula:
=AVERAGE(TAKE(CHOOSECOLS(SORT(FILTER(A2:C21,B2:B21="Xavier")),3),-8))
 
Upvote 0
Welcome to the MrExcel board!

Could it be this?

Options in E2 for last x scores to consider and F2 for how many (n) "worst" scores to drop off.
In my example,
If a player has 5 or more scores then the last 5 are taken and the worst 2 dropped before averaging.
If a player only has 4 scores then only 1 would be dropped to average the best 3.
Similarly if a player only had 3 scores then none would be dropped and all 3 averaged.
If a player has less than 3 scores then all their scores are averaged.

Ratfink52.xlsm
ABCDEFGHI
1DatePlayerScoreLast xDrop nNameAvg best 3 of last 5
21/07/2024Player 15552Player 179
31/07/2024Player 282Player 280.66666667
41/07/2024Player 368Player 396.66666667
51/07/2024Player 756Player 491.66666667
61/07/2024Player 957Player 586
71/07/2024Player 561Player 688
81/07/2024Player 874Player 783.33333333
92/07/2024Player 351Player 880.66666667
102/07/2024Player 499Player 957
112/07/2024Player 872
122/07/2024Player 263
132/07/2024Player 599
142/07/2024Player 187
152/07/2024Player 750
163/07/2024Player 465
173/07/2024Player 183
183/07/2024Player 273
193/07/2024Player 775
203/07/2024Player 554
213/07/2024Player 390
223/07/2024Player 868
234/07/2024Player 397
244/07/2024Player 495
254/07/2024Player 788
264/07/2024Player 689
274/07/2024Player 896
284/07/2024Player 161
294/07/2024Player 282
305/07/2024Player 787
315/07/2024Player 167
325/07/2024Player 598
335/07/2024Player 481
345/07/2024Player 687
355/07/2024Player 287
365/07/2024Player 398
376/07/2024Player 395
386/07/2024Player 468
396/07/2024Player 162
406/07/2024Player 263
417/07/2024Player 158
427/07/2024Player 485
437/07/2024Player 776
448/07/2024Player 496
458/07/2024Player 391
468/07/2024Player 165
Sheet1
Cell Formulas
RangeFormula
I1I1="Avg best "&E2-F2&" of last "&E2
H2:I10H2=LET(n,SORT(UNIQUE(B2:B40)),HSTACK(n,BYROW(n,LAMBDA(r,AVERAGE(TAKE(SORT(TAKE(FILTER(R1:R39,Q1:Q39=r),E2),,-1),E2-F2))))))
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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