Excel Tools

Merge two Excel files based on a common column

A VLOOKUP for whole files. Pick the column the two files share, such as an ID, SKU or email, tick the columns to bring over, and download the result with the rows that found no match.

No files at hand? (orders in A, a price list in B).

How to merge two Excel files by a common column

  1. Choose file A, the one you want to complete (orders, employees, a customer list), and file B, the one that holds the extra data (prices, departments, regions).
  2. Check the key. The column the two files have in common, such as an ID, SKU or email, is suggested automatically, even if it has a different name in each file. Add a second column for composite keys.
  3. Pick the columns to bring from B and which rows to keep.
  4. Merge and download. The Excel file has the result, the rows of A that were not found in B, the rows of B that were not found in A, and a summary.

Private by design

Both files are read and matched by JavaScript in your browser, in a background worker. They are never uploaded, so you can match payroll, customer or supplier data safely. The page only downloads its own code and the open-source SheetJS and PapaParse libraries from this site.

A VLOOKUP for whole files

In Excel, bringing a column from another workbook means writing =VLOOKUP(A2,[prices.xlsx]Sheet1!$A:$C,3,FALSE) or =XLOOKUP(A2,…), copying it down, repeating it for every column you need, and then fighting with #N/A. Here you choose the key once, tick the columns, and every row gets its data. The result is plain values, so it does not break when the lookup file is moved or closed.

It also does what VLOOKUP cannot: match on two or three columns at once, show which rows found nothing in either file, and return every match instead of only the first one when a key is repeated.

Which rows end up in the result

Duplicate keys: first match or all matches

If the same key appears several times in B, VLOOKUP silently returns the first one. That is the default here too, and the tool tells you how many keys are repeated and shows examples, so you know it happened. Choose “Take all matches” to get one result row per match instead, which is what you need for one-to-many data such as a customer and all their invoices. The summary sheet records which option you used.

Why keys do not match, and how to fix it

Known limitations

Frequently asked questions

Is it really free?

Yes. It is 100% free, with no usage limits, no account, no sign-up and no paid plan.

Are my files uploaded?

No. Both files are processed in your browser. The page only downloads its own code and libraries from this site. If you accept analytics cookies, Google Analytics receives anonymous usage data such as page views, never the contents or names of your files.

How do I merge two Excel files based on one column?

Choose the main file as A and the file with the extra data as B. The common column is suggested automatically; check it, tick the columns to bring from B and click Merge by column. Every row of A gets the matching data from B.

Is this the same as VLOOKUP?

The default, “All of A (left join)” with “Take the first match”, gives the same result as a VLOOKUP or XLOOKUP with exact match for every column you tick. Unlike VLOOKUP it can also match on several columns, return all matches and list the rows that found nothing.

What happens with duplicate keys?

If a key appears several times in B, you choose: take the first match, like VLOOKUP, or take all matches, which adds one result row per match. The tool tells you how many keys are repeated and shows examples before and after merging.

Why do some rows not match?

Usually because of trailing spaces, numbers stored as text (“001” and 1), upper case or accents. Spaces and case are ignored by default, and you can also treat 001 and 1 as equal or ignore accents. Rows that still find nothing are listed in their own sheets.

Can the files have different column names or orders?

Yes. You pick the key column in each file separately, so “SKU” in one file can match “Product code” in the other, in any position.

How big can the files be?

There is no fixed limit or quota. Both files are loaded in memory, so a recent computer handles hundreds of thousands of rows; on phones keep each file under about 20 MB.

Analytics: only if you accept cookies, the page loads Google Analytics (through Google Tag Manager) to count visits and see which tools are used. It never receives the contents or names of your files. You can change your choice at any time with “Cookie settings” at the bottom of the page.