A macro might not be nessecary. Take a look at this solution:
I have used column E of sheet 2 to input the following formula:
Adjust the range of column A of sheet1 and then drag the formula down.
Now you have got a list of account numbers which exist on both sheets.
Is this a satisfying answer?