Searching for a formula to display highest score and last date student tested

Excelself

New Member
Joined
Mar 16, 2018
Messages
22
I have a database containing hundreds of students. That database has student ID numbers (column A), student last name (column B), students first name (column C), test scores (column D) , and test date (column E) as shown below. I want column F to display the student's ID number, column G, the student's last name, column H , the student's first name, column I, the student's highest score from all the tests he/she has taken and column J, the date when that student last tested. The problem is that the database contains information about a same student who has taken the test several times and therefore his/her ID and name appears multiple times with a different test score and a different test date. I want a formula to identify every student from the database by their ID, last name, first name, highest score, and last date he/she tested'.
Thank you!!!

Below is an example of a database

IDLAST NAMEFIRST NAMETEST SCORETEST DATEIDLAST NAMEFIRST NAMEHIGHEST SCORELAST TEST DATE
1771234SMITHALLEN4508/4/19
1771235ABILNOE5629/4/19
1771236VILLAMARY48910/1/19
1771234SMITHALLEN54510/8/19
1771234SMITHALLEN6009/2/19
1771239ESQUIVELMARIO5209/25/19
1771236VILLAMARY5968/30/19

<tbody>
</tbody>
 
A formula approach below. However, note that since a student is doing the test multiple times it would be possible for them to get their highest (or lowest) score on 2 or more different dates with different EFL values.
If that occurs, my formulas would return the most recent date when the highest/lowest score was achieved & the corresponding EFL on that date (see lowest scores for Mary below).

<b>Test Results</b><br /><br /><table border="1" cellspacing="0" cellpadding="0" style="font-family:Arial,Arial; font-size:8pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:68px;" /><col style="width:94px;" /><col style="width:98px;" /><col style="width:102px;" /><col style="width:89px;" /><col style="width:43px;" /><col style="width:68px;" /><col style="width:94px;" /><col style="width:98px;" /><col style="width:50px;" /><col style="width:88px;" /><col style="width:78px;" /><col style="width:49px;" /><col style="width:87px;" /><col style="width:77px;" /><col style="width:89px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td><td >I</td><td >J</td><td >K</td><td >L</td><td >M</td><td >N</td><td >O</td><td >P</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="font-size:10pt; text-align:right; ">ID</td><td style="font-size:10pt; ">LAST NAME</td><td style="font-size:10pt; ">FIRST NAME</td><td style="font-size:10pt; text-align:right; ">TEST SCORE</td><td style="font-size:10pt; text-align:right; ">TEST DATE</td><td style="font-size:10pt; text-align:right; ">EFL</td><td style="font-size:10pt; text-align:right; ">ID</td><td style="font-size:10pt; ">LAST NAME</td><td style="font-size:10pt; ">FIRST NAME</td><td style="font-size:10pt; text-align:right; ">HIGH</td><td style="font-size:10pt; text-align:right; ">HIGH DATE</td><td style="font-size:10pt; text-align:right; ">HIGH EFL</td><td style="font-size:10pt; text-align:right; ">LOW</td><td style="font-size:10pt; text-align:right; ">LOW DATE</td><td style="font-size:10pt; text-align:right; ">LOW EFL</td><td style="font-size:10pt; text-align:right; ">LAST DATE</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="font-size:10pt; text-align:right; ">1771234</td><td style="font-size:10pt; ">SMITH</td><td style="font-size:10pt; ">ALLEN</td><td style="font-size:10pt; text-align:right; ">450</td><td style="font-size:10pt; text-align:right; ">4/08/2019</td><td style="font-size:10pt; text-align:right; ">1</td><td style="font-size:10pt; text-align:right; ">1771234</td><td style="font-size:10pt; ">SMITH</td><td style="font-size:10pt; ">ALLEN</td><td style="font-size:10pt; text-align:right; ">600</td><td style="font-size:10pt; text-align:right; ">2/09/2019</td><td style="font-size:10pt; text-align:right; ">5</td><td style="font-size:10pt; text-align:right; ">450</td><td style="font-size:10pt; text-align:right; ">4/08/2019</td><td style="font-size:10pt; text-align:right; ">1</td><td style="font-size:10pt; text-align:right; ">8/10/2019</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="font-size:10pt; text-align:right; ">1771235</td><td style="font-size:10pt; ">ABIL</td><td style="font-size:10pt; ">NOE</td><td style="font-size:10pt; text-align:right; ">562</td><td style="font-size:10pt; text-align:right; ">4/09/2019</td><td style="font-size:10pt; text-align:right; ">2</td><td style="font-size:10pt; text-align:right; ">1771235</td><td style="font-size:10pt; ">ABIL</td><td style="font-size:10pt; ">NOE</td><td style="font-size:10pt; text-align:right; ">562</td><td style="font-size:10pt; text-align:right; ">4/09/2019</td><td style="font-size:10pt; text-align:right; ">2</td><td style="font-size:10pt; text-align:right; ">562</td><td style="font-size:10pt; text-align:right; ">4/09/2019</td><td style="font-size:10pt; text-align:right; ">2</td><td style="font-size:10pt; text-align:right; ">4/09/2019</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td style="font-size:10pt; text-align:right; ">1771236</td><td style="font-size:10pt; ">VILLA</td><td style="font-size:10pt; ">MARY</td><td style="font-size:10pt; text-align:right; ">489</td><td style="font-size:10pt; text-align:right; ">1/10/2019</td><td style="font-size:10pt; text-align:right; ">3</td><td style="font-size:10pt; text-align:right; ">1771236</td><td style="font-size:10pt; ">VILLA</td><td style="font-size:10pt; ">MARY</td><td style="font-size:10pt; text-align:right; ">596</td><td style="font-size:10pt; text-align:right; ">30/08/2019</td><td style="font-size:10pt; text-align:right; ">7</td><td style="font-size:10pt; text-align:right; ">489</td><td style="font-size:10pt; text-align:right; ">1/10/2019</td><td style="font-size:10pt; text-align:right; ">3</td><td style="font-size:10pt; text-align:right; ">1/10/2019</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td style="font-size:10pt; text-align:right; ">1771234</td><td style="font-size:10pt; ">SMITH</td><td style="font-size:10pt; ">ALLEN</td><td style="font-size:10pt; text-align:right; ">545</td><td style="font-size:10pt; text-align:right; ">8/10/2019</td><td style="font-size:10pt; text-align:right; ">4</td><td style="font-size:10pt; text-align:right; ">1771239</td><td style="font-size:10pt; ">ESQUIVEL</td><td style="font-size:10pt; ">MARIO</td><td style="font-size:10pt; text-align:right; ">520</td><td style="font-size:10pt; text-align:right; ">25/09/2019</td><td style="font-size:10pt; text-align:right; ">6</td><td style="font-size:10pt; text-align:right; ">520</td><td style="font-size:10pt; text-align:right; ">25/09/2019</td><td style="font-size:10pt; text-align:right; ">6</td><td style="font-size:10pt; text-align:right; ">25/09/2019</td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td style="font-size:10pt; text-align:right; ">1771234</td><td style="font-size:10pt; ">SMITH</td><td style="font-size:10pt; ">ALLEN</td><td style="font-size:10pt; text-align:right; ">600</td><td style="font-size:10pt; text-align:right; ">2/09/2019</td><td style="font-size:10pt; text-align:right; ">5</td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td style="font-size:10pt; text-align:right; ">1771239</td><td style="font-size:10pt; ">ESQUIVEL</td><td style="font-size:10pt; ">MARIO</td><td style="font-size:10pt; text-align:right; ">520</td><td style="font-size:10pt; text-align:right; ">25/09/2019</td><td style="font-size:10pt; text-align:right; ">6</td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td style="font-size:10pt; text-align:right; ">1771236</td><td style="font-size:10pt; ">VILLA</td><td style="font-size:10pt; ">MARY</td><td style="font-size:10pt; text-align:right; ">596</td><td style="font-size:10pt; text-align:right; ">30/08/2019</td><td style="font-size:10pt; text-align:right; ">7</td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td></tr><tr style="height:21px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td style="font-size:10pt; text-align:right; ">1771236</td><td style="font-size:10pt; ">VILLA</td><td style="font-size:10pt; ">MARY</td><td style="font-size:10pt; text-align:right; ">489</td><td style="font-size:10pt; text-align:right; ">30/08/2019</td><td style="font-size:10pt; text-align:right; ">8</td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td><td style="font-size:10pt; "> </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >G2</td><td >=IFERROR(INDEX<span style=' color:008000; '>($A$2:$A$100,MATCH<span style=' color:#0000ff; '>(0,INDEX<span style=' color:#ff0000; '>(COUNTIF<span style=' color:#804000; '>($G$1:G1,$A$2:$A$100)</span>+<span style=' color:#804000; '>(A$2:A$100="")</span>,0)</span>,0)</span>)</span>,"")</td></tr><tr><td >H2</td><td >=IF($G2="","",INDEX<span style=' color:008000; '>(B$2:B$100,MATCH<span style=' color:#0000ff; '>($G2,$A$2:$A$100,0)</span>)</span>)</td></tr><tr><td >I2</td><td >=IF($G2="","",INDEX<span style=' color:008000; '>(C$2:C$100,MATCH<span style=' color:#0000ff; '>($G2,$A$2:$A$100,0)</span>)</span>)</td></tr><tr><td >J2</td><td >=IF($G2="","",AGGREGATE<span style=' color:008000; '>(14,6,D$2:D$100/<span style=' color:#0000ff; '>($A$2:$A$100=$G2)</span>,1)</span>)</td></tr><tr><td >K2</td><td >=IF(G2="","",AGGREGATE<span style=' color:008000; '>(14,6,E$2:E$100/<span style=' color:#0000ff; '>(<span style=' color:#ff0000; '>(A$2:A$100=G2)</span>*<span style=' color:#ff0000; '>(D$2:D$100=J2)</span>)</span>,1)</span>)</td></tr><tr><td >L2</td><td >=IF(G2="","",INDEX<span style=' color:008000; '>(F:F,AGGREGATE<span style=' color:#0000ff; '>(15,6,ROW<span style=' color:#ff0000; '>(F$2:F$100)</span>/<span style=' color:#ff0000; '>(<span style=' color:#804000; '>(A$2:A$100=G2)</span>*<span style=' color:#804000; '>(D$2:D$100=J2)</span>*<span style=' color:#804000; '>(E$2:E$100=K2)</span>)</span>,1)</span>)</span>)</td></tr><tr><td >M2</td><td >=IF($G2="","",AGGREGATE<span style=' color:008000; '>(15,6,D$2:D$100/<span style=' color:#0000ff; '>($A$2:$A$100=$G2)</span>,1)</span>)</td></tr><tr><td >N2</td><td >=IF(G2="","",AGGREGATE<span style=' color:008000; '>(14,6,E$2:E$100/<span style=' color:#0000ff; '>(<span style=' color:#ff0000; '>(A$2:A$100=G2)</span>*<span style=' color:#ff0000; '>(D$2:D$100=M2)</span>)</span>,1)</span>)</td></tr><tr><td >O2</td><td >=IF(G2="","",INDEX<span style=' color:008000; '>(F:F,AGGREGATE<span style=' color:#0000ff; '>(15,6,ROW<span style=' color:#ff0000; '>(F$2:F$100)</span>/<span style=' color:#ff0000; '>(<span style=' color:#804000; '>(A$2:A$100=G2)</span>*<span style=' color:#804000; '>(D$2:D$100=M2)</span>*<span style=' color:#804000; '>(E$2:E$100=N2)</span>)</span>,1)</span>)</span>)</td></tr><tr><td >P2</td><td >=IF($G2="","",AGGREGATE<span style=' color:008000; '>(14,6,E$2:E$100/<span style=' color:#0000ff; '>($A$2:$A$100=$G2)</span>,1)</span>)</td></tr></table></td></tr></table>
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Sorry for the confusion, the post was meant for Peter. Yes, the ID number is the same for Christopher as rectified below.

Thank you

Student IdStudent Last NameStudent First NameTest Type CdTest DtScale ScoreEfl
1793528AcevedoBlessingTABE 11/12 Reading9/18/20194932
1775820AckerChristopherTABE 11/12 Reading8/8/20194822
1812454AcostaBrittanyTABE 11/12 Reading10/9/20194862
1797562AcostaBryanTABE 11/12 Reading7/19/20194772
1801415Addison JrDelaneyTABE 11/12 Reading9/11/20194932
1790581
AguirreChristopherTABE 11/12 Reading7/9/20194872
17806581Aguirre
ChristopherTABE 11/12 Reading9/20/20194822
1780581
AguirreChristopherTABE 11/12 Reading8/12/20195504
1618791
AlbarranJackielynnTABE 11/12 Reading7/9/20195724

<tbody>
</tbody>
 
Upvote 0
Thank you Peter, I did not realize you had already answered my post. Will try it and will let you know.

Good Day!
 
Upvote 0

Forum statistics

Threads
1,214,962
Messages
6,122,482
Members
449,088
Latest member
Melvetica

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