%%
Last Updated:
- [[2021-02-10]]
%%
If you have two (or more) sets of the same kind of data and you want to compare them to find either the duplicates or the differences, this site may be useful: [https://support.microsoft.com/en-us/kb/213367](https://support.microsoft.com/en-us/kb/213367)
If A1:A5 contains one list and C1:C5 contains another list, this is the formula to put in column B:
```
=IF(ISERROR(MATCH(A1,$C$1:$C$5,0)),"",A1)
```
## Match
This formula returns the position in Column C of a record in Column A. Ex: If "2" were in C1, a match for this would return the position "1" because it's the first in line. If the record is not found in Column C, the match formula will return an error: "N/A".
## Iserror
Exploiting the "N/A" from the match formula, the Iserror formula returns true if there is an error and false if there is no error. That is, it returns true if the record is not found in Column C and returns false if the record IS found in Column C.
## If
The if formula, wrapped around the Iserror and match formulas as in this case, describes what the final output should be if the record is not found in C. The formula stated at the beginning will output nothing if the record is not found and it will output the record's value if it IS found. This is more useful when what you need to find is the DUPLICATE values.
However, it can also be easily modified to find the UNIQUE values instead:
```
=IF(ISERROR(MATCH(A1,$C$1:$C$5,0)),A1,"")
```
This will return the record's value if is not found and will return nothing if it IS found.