Fuzzy search of values from one column in another

chilly_bang

Board Regular
Joined
Jun 17, 2016
Messages
57
I have one column with words, and another one with sentences. I want get into knowledge, which sentences from the second column contain words from the first column, putting into the third column something like "contains / not contains". Case insensitive could it be.

Example:

Code:
+-------------+----------------------------------------------------+---------------+
| Salta       | Kabul,Kabul,Afghanistan                            | don't contain |
+-------------+----------------------------------------------------+---------------+
| united      | Luanda,Luanda Province,Angola                      | don't contain |
+-------------+----------------------------------------------------+---------------+
| test        | The Valley,Anguilla                                | don't contain |
+-------------+----------------------------------------------------+---------------+
| Argentina   | Abu Dhabi,Abu Dhabi,United Arab Emirates           | contains      |
+-------------+----------------------------------------------------+---------------+
| anotherTest | Ajman,Ajman,United Arab Emirates                   | don't contain |
+-------------+----------------------------------------------------+---------------+
| End         | Al Ain,Abu Dhabi,United Arab Emirates              | don't contain |
+-------------+----------------------------------------------------+---------------+
| Of          | Dubai,Dubai,United Arab Emirates                   | don't contain |
+-------------+----------------------------------------------------+---------------+
| Test        | Ras Al-Khaimah,Ras al Khaimah,United Arab Emirates | don't contain |
+-------------+----------------------------------------------------+---------------+
| Yes         | Salta,Salta Province,Argentina                     | contains      |
+-------------+----------------------------------------------------+---------------+

Tried it with
Code:
=IF(ISERROR(VLOOKUP(A1,$B$1:$B$9, 1, FALSE)),"Not Exist","Exist" )
, but no luck...
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Enter as array formula (Ctrl+Shift+Enter):

Code:
= IF(SUM(1 * ISNUMBER(SEARCH(A1,$B$1:$B$9))), "Exists", "Not Exists")
 
Upvote 0
How about


Book1
ABCD
1Any wordFull match
2SaltaKabul,Kabul,AfghanistanDoesn't containDoesn't contain
3unitedLuanda,Luanda Province,AngolaDoesn't containDoesn't contain
4testThe Valley,Anguilla, SaltaContainsContains
5ArgentinaAbu Dhabi,Abu Dhabi,United Arab EmiratesContainsDoesn't contain
6Al ainAjman,Ajman,United Arab EmiratesContainsDoesn't contain
7EndAl Ain,Abu Dhabi,United Arab EmiratesContainsContains
8OfDubai,Dubai,United Arab EmiratesContainsDoesn't contain
9TestRas Al-Khaimah,Ras al Khaimah,United Arab EmiratesContainsDoesn't contain
10YesSalta,Salta Province,ArgentinaContainsContains
Lookup
Cell Formulas
RangeFormula
C2=IF(SUMPRODUCT(--(ISNUMBER(SEARCH($A$2:$A$10,B2)))),"Contains", "Doesn't contain")
D2=IF(SUMPRODUCT(--(ISNUMBER(SEARCH($A$2:$A$10&",",B2&",")))),"Contains", "Doesn't contain")
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top