either should work something like these...
=MAXIFS($E$2:$E$18,$B$2:$B$18,B2)
and
=MINIFS($E$2:$E$18,$B$2:$B$18,B2)
but with extended ranges.
and if you have a distinct list of the names point to that instead.