I have a macro with two workbooks open, the macro is running in a separate "control" workbook, all files are in the same folder.

WB1 contains sheet "Setup Sheet" with data for around 1000 club members, with a unique numeric member number in column A, starting at cell A5. The numbers are not in numerical order, and there are no blanks, the number of members will change over time, and the numbers will not be consequtive (missing members who have left).

WB2 contains one sheet ("sheet1") with a subset of the above membership numbers in column A starting at A1, again not in numerical order and with no blanks.

I'm looking for an efficient solution that for each member no. listed in WB2-sheet1 an "X" is inserted into column G in WB-Setup Sheet in the row with the same member no.

If WB2-sheet1 is empty or missing, then the whole bit of code should be skipped. I've got the test for WB2-sheet1 existing, but not if it's empty. Ideally if a member number exists in WB2 but not in WB1 it should flag an error.

I can see ways of doing it by resorting and using something equivalent to a vlookup function, but that seems quite cumbersome. I haven't really thought further about the error handling yet.

For info WB1 is derived from our main membership spreadsheet by the control macro and is then used on a laptop with a bar code reader attached, to register members attending meetings. From time to time we want to be able flag particular members as they register (eg to contact the secretary).

Can anyone help?