Assuming that the first list is in sheet 1 with names in col A and ID in col B, and the same in sheet 2 for the 2nd list,
then to "=VLOOKUP(A2;Sheet1!A:B;2;0)" will return the ID in sheet 1 of the name in cell A2 of sheet 2.
You need to put a 0 as the 4th parameter to force an exact match.
If there are 2 identical names in sheet 1, the formula will return the first one.
If a name is not found, it will return NA# that you'll need to deal with.
I searched the whole column, but you may want to use a named range or dynamic range to restrict the search, but I don't think that it does make much difference performance wise.
see attached example.
|