It looks for the value in A1 anywhere in sheet2, column A.
It's a sequential search through column A, but once a match is found, it stops
looking. But all that stuff is taken care of by excel.
You don't have to compare A1 with sheet2!a1, then A1 with sheet2!a2, then with
sheet2!a3, ....
(I'm not quite sure if this answered your question, though.)