=IF(VLOOKUP(B2, table 1! B:E, 4,)<& gtG2, "different", ")
or
=IF(VLOOKUP(B2, table 1! B:E, 4,) =G2, ","different ")
Pull-down filling