Thread: Vlookup help
View Single Post
 
Old 08-04-2021, 03:54 PM
Dominique Gascon Dominique Gascon is offline Windows 10 Office 2019
Novice
 
Join Date: Jan 2021
Posts: 7
Dominique Gascon is on a distinguished road
Default

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.
Attached Files
File Type: xlsx Vlookup.xlsx (15.3 KB, 8 views)
Reply With Quote