Excel – Compare two unordered lists in Excel and return differences

microsoft excel

I have two Excel files, with customer data. I need to compare the two.

I have copied the username column from both into a new sheet. Now I want to go through, and if the username is in the first column and the second, ignore that record. So I have a list of only the unique usernames.

The lists are not in any order, so I cannot just compare each column depending on row, I need to compare one cell, to all the cells in the other column, all the way through.

Is this even possible? I have never used Excel before.

Best Answer

A quick and dirty way to do this is to use a vlookup formula to identify names from File 1 that also appear in File 2. If the vlookup returns an error, then the name is unique (not found).

enter image description here

The formula in column C is =IF(ISERROR(VLOOKUP(A2,B:B,1,FALSE)),A2,"")

It basically says if looking up the exact name from cell A1 in column B returns an error, then show the name from A1; otherwise, show a blank cell.

The formula in Column D does the same thing, but compares the names in column B to the list of names in column A.

You can get creative with this formula in how you show it in your spreadsheet, but this should get your started with some ideas.

Related Question