Formulas to generate "previous average test score" and "previous max test score" for multiple students

ea2146

New Member
Joined
Apr 9, 2012
Messages
30
Hello,

Thank you in advance for your help! I REALLY appreciate it!

I have thousands of previous test scores for hundreds of students along with the dates of the tests (so I can determine the chronological order of the test scores for each student). I want to create a formula that will calculate each student's previous performance up to the current point in time. Specifically, I need a formula that will automatically calculate the values that are currently in columns D and E of the below table. Column D shows the average of previous scores for each student. For example, in the row that represents the third test date for Student 1, I want the average of Student 1's first two test scores to appear (in the example below, the average of 98+72=85). Column E shows the max of previous scores for each student. For example, in the row that represents the third test date for Student 1, I want the max of Student 1's first two test scores to appear (in the example below, the max of 98 and 72 is 98).

I would greatly appreciate it if someone could provide a formula to calculate the values in Column D and a formula to calculate the values in Column E.

Thanks!!!

StudentDate of TestTest ScoreAverage Previous Test ScoreHighest Previous Test Score
12/10/201598NANA
13/12/2015729898
14/9/2015798598
15/15/2015888398
16/2/20158084.2598
23/8/201593NANA
24/2/2015719393
25/1/2015898293
26/5/20158884.3333333393
27/15/20156785.2593
33/2/201576NANA
34/6/2015987676
35/24/2015978798
36/3/20156790.3333333398
37/18/20157584.598
41/14/201574NANA
42/12/2015897474
43/23/20159981.589
44/14/20156587.3333333399
45/21/20158781.7599

<tbody>
</tbody>
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi.

Assuming you have Excel 2010 or later, and that your table is in A1:G21 (with headers in row 1), in D2:

=IF(COUNTIF(A$2:A2,A2)=1,"NA",AVERAGEIF(A$1:A1,A1,C$1:C1))

In E2:

=IF(D2="NA",D2,AGGREGATE(14,6,C$1:C1/(A$1:A1=A1),1))

Copy down as required.

Regards
 
Upvote 0
Thank you so much, XOR LX!!

This is perfect. I really appreciate you taking the time to help :)
 
Upvote 0

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

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