Try this formula in B1 on Sheet1
=IF(A1=Sheet2!A1,A1,"")
or
=IF(A1=Sheet2!A1,"Match","No Match")
You can then copy and paste the formula down column B and it will keep the relative references
eg. copying the formula to B4 will result in =IF(A4=Sheet2!A4,A4,"")