How to compare two Excel files by key
Cell-by-cell comparison breaks as soon as rows move. Key-based comparison pairs records by a stable identifier, then checks the fields inside each matched pair.
Choose a key that represents one record
A useful key is stable, populated, and unique. Product SKU, employee ID, policy number, or an invoice-and-line combination are common examples. For example, if the first file contains SKU-001, 12.00 and SKU-002, 8.00, while the second contains SKU-002, 8.00 and SKU-001, 12.50, the key pairs both rows despite the reorder and reports one price change. Names and descriptions are usually poor keys because spelling and formatting change.
- Profile blanks and duplicates in the proposed key.
- Use multiple columns when one column is not unique.
- Keep the same key definition for both files.
Normalize only what is harmless
Trimming accidental spaces is often safe. Ignoring letter case may be safe for names but dangerous for case-sensitive identifiers. Numeric tolerance should reflect a documented business rule, not a convenient way to hide mismatches. ExactDiff reads the first worksheet, accepts XLSX up to 30 MB compressed (150 MB expanded, 100,000 rows by 1,000 columns), and accepts CSV/TSV up to 50 MB.
Review exceptions in the right order
Start with duplicate keys because they make one-to-one matching ambiguous. Next review added and removed records, then field-level changes. Export the exceptions with the source hashes and settings when the result supports a control or audit.