How to Compare Two Excel Files and Find the Differences
You have an old and a new version of a list and you need to know what changed. Comparing by eye is slow and easy to get wrong. Here are four ways to do it.
Before you start
- Both files should use the same column names.
- Find one column that is unique for every row, such as an ID, email or SKU. This is your key.
- Clean extra spaces first, so "North" and "North " are not treated as different.
Way 1: Find new and missing rows
In file A, add a column with =COUNTIF(B!A:A, A2), where B!A:A is the key column of file B. A result of 0 means the row is missing from file B. Do the same in file B to find new rows.
Way 2: Find changed values
Bring the matching value from the other file next to yours with VLOOKUP or XLOOKUP, then add a column such as =C2=D2. FALSE shows a changed cell.
Way 3: Side by side
Open both files and choose View → View Side by Side. It helps with small files, but you still compare by eye.
Way 4: In your browser
Open the first file in DataGenius BI. In Compare With Another File, pick the second file and choose the key column. You get the number of rows that are the same, changed, only in the second file and only in your data, plus a download with every changed cell listed.
Good to know
- Columns are matched by name, ignoring capital letters and extra spaces.
- If a key appears twice, only the first row is used. The report tells you how many were skipped.
- You can use two key columns, such as first name and date, when no single column is unique.
Common questions
What if my files have no unique ID column?
Use two columns that are unique together, such as name and date. The browser tool accepts two key columns.
Why does a row show as changed when it looks the same?
Often there is a hidden difference, such as a trailing space or a number saved as text. Clean both files first. The browser comparison ignores extra spaces and treats 1 and 1.0 as the same.
Can I compare files that have different columns?
Yes, but only columns with the same name in both files are compared. The others are listed as not compared.
Related guides
Check its quality score and clean it in your browser. Free, no signup, and your file is never uploaded.
Try DataGenius BI