ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup when more than one possiblity (https://www.excelbanter.com/excel-worksheet-functions/75077-vlookup-when-more-than-one-possiblity.html)

samenvoegen van sheets

Vlookup when more than one possiblity
 
Hello,

I'm using the VLOOKUP function to find some place's code within a table.
My problem is that some places in the world are writen the same way but are
not in the same contry and so don't have the same code.
now if i'm using the Vlookup it will only take the first name and sometimes
the wrong code.
How can i do, to let the function make an error if there are two or more
similair places?


thks in advance,
Flo


Dav

Vlookup when more than one possiblity
 

If your name that you are looking up is in a2

countif(Range of names,a2) will count the number of occurences

so if the range of names is in a4:a100

if(countif(a4:a100,a2)1,"Error",vlookup(whatever your formula is))

Would work

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=518621



All times are GMT +1. The time now is 02:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com