Hi all,
Vlookup code I'm using:
Column A has abbreviated names.=VLOOKUP(a2,[MappingTables.xlsx]names!A:B,2,)
Mapping table has abbreviated names and full names.
If name does not exist, vlookup writes "#N/A."
I would like it to just copy the abbreviated name instead if name is not found.
On a tight deadline, please help?
Thank you!
Last edited by contra76; 10-21-2010 at 11:19 PM.
Try using IFERROR function, i.e.
=IFERROR(VLOOKUP(A2,[MappingTables.xlsx]names!A:B,2,0),A2)
Audere est facere
Do the abreviated names have parts of the real name? IE looking up edinburgh in a2, =VLOOKUP(a2,[MappingTables.xlsx]names!A:B,2,)
where A2 contains "*Edin*" and that works. but you would get a problem if there was partial names that were duplicated, edinburgh and edinside....
I don't know why but this worked the other day and now it's populating "0s" instead of a blank. Remedy?
Do you mean if A2 is blank, you want a blank instead of a 0?
If so,
=IF(A2="","",IFERROR(VLOOKUP(A2,[MappingTables.xlsx]names!A:B,2,0),A2))
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks