Reputation: 1246
I have two lists:
list 1:
gnat
dog
cat
house
dog
list 2:
dog
mouse
flat
cat
cat
I want to check if any of the words in list 2 are in list 1, regardless of where the word exists in the list, so in the end, I should get something like this:
gnat dog Yes
dog mouse No
cat flat No
house cat Yes
dog cat Yes
Does anyone know how I can do this? I've tried the following but have had no luck:
=IF(ISNUMBER(SEARCH(A:A,B1)), "Yes", "No")
=IF(ISERROR(FIND(A:A,B:1)),"Yes", "No")
Upvotes: 0
Views: 73
Reputation: 96753
In C1:
=IF(COUNTIF($A$1:$A$5,B1)=0,"No","Yes")
and copy down.
For dog, you will get "Yes" no matter how many dogs there are in column A.
Upvotes: 4