How to compare two CSV files and find the differences

To compare two CSV files, match rows by a column both files share, like an ID or email, then check which rows were added, removed, or changed. You can do this with lookup formulas, or with SheetSweep Compare, which shows all three side by side.

Option 1: Lookup formulas in Google Sheets or Excel

  1. Put the old file on one sheet (Old) and the new file on another (New). Make sure both have a unique key column, say column A.
  2. On the New sheet, in an empty column, flag rows that are new: =IF(COUNTIF(Old!A:A, A2)=0, "Added", "")
  3. On the Old sheet, flag rows that were removed: =IF(COUNTIF(New!A:A, A2)=0, "Removed", "")
  4. To catch changed values, look up each field from the old sheet and compare, for example: =IFERROR(IF(VLOOKUP(A2, Old!A:D, 2, FALSE)<>B2, "Changed", ""), "") Repeat for each column you care about.
  5. Filter the flag columns to see the differences.

This works but gets slow and messy with many columns, and it's easy to miss a changed cell.

Option 2: A text diff tool

Text diff tools (like the compare view in many code editors) show line-by-line changes. They're fine when rows stay in the same order, but if rows are sorted differently, almost every line looks changed.

Option 3: SheetSweep Compare (Pro, nothing uploaded)

  1. Open SheetSweep Compare.
  2. Add the old and new files. CSV, TSV, XLSX, and XLS work, and you can pick a sheet when needed.
  3. Choose a shared key, like ID, email, or SKU.
  4. Review every difference: added rows, removed rows, and changed cells, shown separately.

Because rows are matched by key, the order of rows doesn't matter. Formulas are never run during the comparison, and both source files stay untouched.

FAQ

Do the rows need to be in the same order?

No. Compare matches rows by the key column you choose, then compares them cell by cell.

Can I compare an Excel file to a CSV?

Compare works with Excel, CSV, and TSV files.

Is Compare free?

Compare is part of Pro ($29/month), along with Merge, Split, Bulk Clean, batch Convert, and 25 MB files. See pricing.

See what changed

Skip the VLOOKUPs. Try SheetSweep Compare and see every added, removed, and changed row in one view, right in your browser.