Today, we want to compare two lists. Being more precise, we want to find elements that are on both lists, as well as elements that are only on one list.
This time, we will use Dynamic Array formulas. It makes the operation easier than using Legacy Excel formulas.
We’re starting with the XMATCH function. In the first two arguments, we write a list of elements that we are looking for, and the list that those elements are looked up in (Fig. 1)
=XMATCH(C2:C9,A2:A11)

In the results, we can see that we have #N/A errors in the places where Excel didn’t find any match, and numbers where it found the proper match (Fig. 2)

Now, we want to extract the values where Excel has found the match. To to this, we can add the ISNUMBER function to the XMATCH function (Fig. 3)
=ISNUMBER(XMATCH(C2:C9,A2:A11))

Now, our results are FALSEs and TRUEs. What we can do now, is add the FILTER function. In the first argument, we have to write the array with elements that we are looking for (Fig. 4)
=FILTER(C2:C9, ISNUMBER(XMATCH(C2:C9,A2:A11))

And we have our results. Now, we want to find elements that are only on the My son’s list. All we need to do, is take the same formula and change the ISNUMBER function into ISNA function (Fig. 5)
=FILTER(C2:C9, ISNA(XMATCH(C2:C9,A2:A11))

And just like that we have found elements that are on both lists and elements that are only on one list (Fig. 6)
