I think ttf’s solution works, but can also suggest this if you’ve got, or are able to add an ID column, or have a date column:
You should be able to replace the values in the “entry” column with dates and it’ll be fine so long as you don’t need to differentiate between two rows with the same date for a single student.
Brief explanation (as good as I can manage by text) of the formula: =INDEX(C:C,MATCH(MAXIFS(A:A,B:B,E2),A:A,0))
MAXIFS finds the largest value in column A, so long as the corresponding value in column B matches the value in E2, this is passed to
MATCH which looks for that value in column A, the ‘0’ indicates it must find an exact match, it then passes the location (index) of that match to
INDEX which returns the value in the corresponding location in column C