When analyzing data you often have to compare two lists to see if
- They both contain the same data
- You’re missing data from one of the lists
- There are any duplicates or misspellings
If you’re looking to compare two lists for equality, you can use simple comparison operators.
By turning column C into a helper column, we can compare the lists in A and B by simply typing
and auto-filling that formula down the column. As you can see this works for text, numbers, and dates the same way.
If you need to check to see if certain values exist or not in the other list, I’d suggest using ISNUMBER and MATCH together to find your answers.
Let’s separate the two columns for a second and add some additional values to List #2:
We’re going to do a check to see which values in List 2 are in List 1.
We’ll create a helper column in Column D and first use the MATCH function to return the ROW that a match exists on, if any.
Excel searches for each of the values in column C inside of column A. The numbers returned are the ROW in column A where a match was found, while #N/A simply means there was no match found.
By wrapping this function in the ISNUMBER function, we can simplify this to only return TRUE (if a row number is found) or FALSE (error, no match).
We can now see exactly which values exist in both List 1 and List 2.