If we can assume that the names in column Y would be grouped together, then:

=IFERROR(MAX(INDEX(Ground3!$A$2:$AQ$10,MATCH($B$2,Ground3!$Y$2:$Y$10,0),MATCH($S$1,Ground3!$A$1:$AQ$1,0)):INDEX(Ground3!$A$2:$AQ$10,MATCH(2,1/(Ground3!$Y$2:$Y$10=B2)),MATCH($S$1,Ground3!$A$1:$AQ$1,0))),"")
confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down.