Blog Open the app

How to Compare Two Excel Files and Find Matching Rows (Even When Data Doesn't Match Exactly)

July 15, 2026 · 9 min read · Written by Sam Kale

You've got two Excel files. Same kind of data in each — maybe customers, maybe products, maybe suppliers. You need to figure out which rows in file A represent the same record as a row in file B, so you can update, merge, or reconcile them.

You try VLOOKUP first. It returns #N/A on most rows. You check the ones it missed and they're obviously the same record — just spelled slightly differently. So you try Power Query. It's slow, hard to configure, and still misses cases you can see with your eyes.

Comparing two spreadsheets to find "same" rows is one of the most common tasks in Excel, and none of Excel's built-in tools do it well when the data is even a little bit messy. Here's how to actually do it, in three steps.

Why Exact-Match Tools Fail on Real Spreadsheets

Excel's comparison tools — VLOOKUP, XLOOKUP, MATCH/INDEX, conditional formatting, Remove Duplicates — all rely on the same thing: an exact string match between two cells. That works when the data is:

It fails as soon as the data was typed by humans, came from different systems, or was manipulated by anyone along the way. Here's what "the same row" looks like in real spreadsheets:

File AFile B
Acme CorpACME Corporation
3M Company3M Co.
H&MH and M
Coca-Cola Co.The Coca Cola Company
Johnson & JohnsonJohnson and Johnson Inc
PricewaterhouseCoopersPwC

Every one of those pairs is the same company. VLOOKUP misses every one of them.

The problem gets worse when the "key" isn't a company name but something even messier: a product description ("32oz stainless steel water bottle" vs "Steel Bottle 32-ounce"), an address ("123 Main Street, Apt 4B" vs "123 Main St #4B"), or a person's name ("Robert J Smith" vs "Bob Smith").

What Fuzzy Comparison Actually Does

Fuzzy comparison scores how similar two strings (or two rows) are on a 0-100 scale, instead of returning a hard true/false. It handles the noise that trips exact-match tools:

Under the hood it's usually one or a combination of the Levenshtein distance, Jaro-Winkler similarity, and token-based algorithms like token_sort_ratio. You don't need to know the algorithms — you just need to know that a score of 100 is identical, 90+ is essentially the same record with formatting differences, 75-90 is likely the same record with real variation, and below 60 is probably a different record.

Step 1: Prepare Both Files

Before comparing, do 5 minutes of prep in each file:

  1. Identify the "key" columns. These are the columns that identify the underlying record. For customers it's usually name + email + phone. For products, name + SKU + brand. For addresses, street + city + zip.
  2. Make sure both files have the same key columns available. If file A has phone but file B doesn't, that column can't help the comparison — leave it out.
  3. Rename headers so equivalent columns have the same name. This isn't strictly required, but it makes the comparison configuration much simpler.
  4. Trim whitespace (=TRIM(A2)) and lowercase (=LOWER(A2)) on all key columns. This alone catches the 10-15% of "matches" that were only different by case or trailing spaces.
  5. Save both files as CSV. UTF-8, comma-delimited. Most fuzzy tools accept both XLSX and CSV, but CSV is more portable.

Skip the temptation to concatenate. Combining name + city + zip into one big =A2&" "&B2&" "&C2 column feels efficient but it's a worse comparison. Multi-column matching with weights (below) is more accurate because each column is scored independently and a mismatch on one doesn't tank the whole row.

Step 2: Configure a Multi-Column Fuzzy Match

Upload both files to a fuzzy matching tool. The universal setup, adapted for different data types:

For customer / contact comparison

ColumnWeight
Email40%
Full name (first + last)35%
Phone15%
Company or city10%

For company / account comparison

ColumnWeight
Domain40%
Company name40%
Country10%
City or address10%

For product / SKU comparison

ColumnWeight
Product name or description50%
Brand or manufacturer25%
Size / model / spec15%
Category10%

Set the match mode to whichever preset the tool offers — company, contact, product, or generic. That toggles normalization rules that matter for that data type (legal suffix stripping for companies, size code parsing for products, etc.).

Step 3: Read the Results

The tool produces a table with one row per file-A record, and for each one, the best-guess match from file B plus a similarity score. You can also usually see the top 3-5 candidate matches for the borderline cases.

Divide the results into buckets:

On a typical two-file comparison (say, 5,000 rows in each), the distribution looks like this:

Total review time on a 5,000-row file: 20-40 minutes, versus days of manual VLOOKUP debugging.

What You Do With the Matched File

The output depends on why you were comparing in the first place. Common purposes and what to do next:

PurposeAction after matching
Find records in A that also exist in BKeep the matched rows. Drop the unmatched.
Find records in A that are NOT in BKeep only the unmatched rows — those are the ones missing from file B.
Enrich file A with data from file BFor matched rows, copy fields from file B (VLOOKUP-style, but on the fuzzy match key).
Merge two versions of the same listCombine matched pairs into single rows, keeping the most-recent or most-complete data.
Reconcile two data sourcesLook at score 70-95 rows to identify data-quality problems in one or both sources.

What About Power Query Fuzzy Merge?

Power Query added a Fuzzy Merge option a few years back, and for very simple cases it works. If you already have both files in Power Query and just need to find rough matches on a single column, it's a reasonable option.

Where it falls short (and why RevOps / finance / data teams end up outside Power Query):

For a 500-row comparison on a single column, Power Query might be enough. For anything bigger or nuanced, a dedicated fuzzy comparison tool will finish in a fraction of the time and catch matches Power Query misses.

We wrote a longer piece on this: Excel Power Query Fuzzy Merge Not Working? Here's What's Actually Going Wrong.

Common Pitfalls to Avoid

Comparing a dirty file against a clean file without cleaning first. If file A has trailing spaces and file B doesn't, half your "misses" will just be the spaces. Trim and lowercase both sides before the comparison.

Setting the threshold too high. A cutoff of 95 will exclude a lot of real matches. Start at 70, look at the distribution, and adjust from there. It's easier to reject false positives in review than to hunt for false negatives.

Forgetting that one file may have multiple matches in the other. If file A has "Acme Corp" appearing once but file B has three rows for Acme (different branches, different years, different data quality), a good fuzzy tool returns all three candidates ranked. Look at the top-N candidates, not just the top-1.

Not saving the score column. Whatever you export, keep the similarity score. Six months from now when someone asks "why did we conclude these are the same record?" the score is the answer.

Treating fuzzy comparison as a black box. It's not magic. If your key column is one you'd struggle to match by eye, the tool will struggle too. Sometimes the fix is a better key column (add a domain or a zip code), not a better algorithm.

Wrapping Up

Comparing two Excel files is one of those tasks that sounds trivial in a meeting and takes a full afternoon in practice. The trap is that Excel's tooling — VLOOKUP, XLOOKUP, and Power Query's fuzzy merge — is calibrated for cleaner data than most spreadsheets actually contain.

Fuzzy comparison bridges that gap. Instead of demanding perfect matches on a single column, it looks at multiple signals, weights them, and returns a ranked, scored result. That means the same records get identified regardless of formatting, abbreviations, typos, or word order.

Prep both files, pick 2-4 key columns, run the match, review the 70-95 band. Twenty minutes for a job that used to take a day.

Related Reading

Got two Excel files sitting on your desktop? Compare them in a few minutes with fuzzy matching on the columns that actually identify the record. Free for 500 rows, no signup.

Try DedupFuzzy Free