C3=MIN(INDEX(($A$3:$A$66<>A3)*25^25+$B$3:$B$66,0))
Try this copy towards down