Search code examples
google-sheetsfiltercountgoogle-sheets-formulamatch

Finding non duplicates


I have 2 lists of names:

ListOfNames1 ListOfNames2
James James
John John
Robert Robert
Michael

I want to make a formula that will detect when a name did not find a match on the other list and output that name, so in this case it would output Michael.

There is probably a very simple solution to this but I simply cannot find it. I tried using stuff such as UNIQUE(), FILTER() but with no luck.

The demo sheet: https://docs.google.com/spreadsheets/d/1uqN6pB7xRXzWmDe1LPWUmo4HNeuH5PTtf2Ckb1B6dvg/edit?usp=sharing


Solution

  • use:

    =FILTER(A2:A, NOT(COUNTIF(B2:B, A2:A)))
    

    enter image description here