Try this:

Formula: copy to clipboard
=IF(MAX(IF($A$2:$A$100=A2,$B$2:$B$100))=B2,B2,"")