=IF(ISERROR(VLLOKUP($A2, Sheet2! $A$2:$B$2,2,),"",VLLOKUP(A2,Sheet2! $ a $2: $ b $2,2,))
format handle drop-down copy formula
Sheet2! $ A $2: $ B $2 is the cell area where the names and corresponding data in Table 2 are located.