0

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")

1 Answer 1

4

In C1:

=IF(COUNTIF($A$1:$A$5,B1)=0,"No","Yes")

enter image description here

and copy down.

For dog, you will get "Yes" no matter how many dogs there are in column A.

Sign up to request clarification or add additional context in comments.

2 Comments

Nice Gary! I think I am coming down with a case of Craner-itis! I immediately started thinking of a sumproduct method! You have the better approach!
@ForwardEd I must agree with you..............I also considered SUMPRODUCT() first

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.