I have a list of cities that I need to match to their city code. There are multiple instances(duplicates) in both columns. Please see image below. Column D is the lookup values. I need to Match the cities in Column D to the Cities in Column A. When there is a match I need to return the city code in column B. My real lookup list (column d ) is lot longer, couple hundred rows . The city column I’m comparing it to (column a) has over a thousand rows.
I have tried vlookup but I’m not getting the right city code values. I understand with vlookup you can’t have duplicates. I can’t remove the duplicates here from the lookup list or the table arrays, I need to keep the lists as they are. A solution or general formula to point me in the right would be greatly appreciated!
Thanks for any insight!
question from:
https://stackoverflow.com/questions/65892532/excel-match-two-columns-return-value-there-are-duplicate-values-in-lookup-list 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…