Try this in H3, copy down.
=IFERROR(INDEX($D$3:$D$10,MATCH(1,IF($B$3:$B$10=G3,IF($C$3:$C$10=SMALL(IF($B$3:$B$10=G3,$C$3:$C$10),1),1)),0)),"")
This is an Array Formula. Copy & paste this in t0 H3, press F2, then press CTRL+SHIFT+ENTER rather than just ENTER. Then you can see the formula covered by {}.
Bookmarks