Homeโ€บBlogโ€บMerge Excel files
๐Ÿ“ Guide ยท 4 min read

Remove Duplicates in Excel While Merging Files by AIMerger

VLOOKUP, Power Query and Remove Duplicates all work. They also all take longer than the job deserves. Here is the one-pass way.

Local processing โ€” your files never leave your device

The problem

You have several files with mostly the same columns โ€” exports from the same system, lists from different colleagues, monthly reports โ€” and you need one sheet with the duplicates gone. In Excel that is: open each file, copy, paste below the last row, hope the columns line up, then Data โ†’ Remove Duplicates and hope you ticked the right columns. It works, and it is where mistakes happen.

Header matching does the lining-up

A merger that reads each file's first row as its headers can stack Email under Email even if it is column B in one file and column D in another. Columns missing from some files are kept and left blank for those rows. The AIMerger CSV & Excel Merger does this in your browser โ€” no file is uploaded, which matters for customer lists.

Deciding what "duplicate" means

Two rows are duplicates when every cell matches, comparing text case-insensitively. That is the safe default. It also means Asha Rao with a trailing space is not a duplicate of Asha Rao without one. If your data is messy, trim spaces first (Excel's TRIM, or find-and-replace double spaces) and then merge. Put the most trustworthy file first โ€” when duplicates are found, the first occurrence is kept.

Steps

  1. Open the CSV & Excel Merger.
  2. Drop the files โ€” XLSX, CSV and TSV can be mixed.
  3. Leave Match columns by header and Remove duplicate rows on.
  4. Merge, check the preview and the count of duplicates removed.
  5. Download as XLSX or CSV.

Try it on your own files below.

Merge spreadsheets into one

Sales exports, signup lists, bank statements โ€” combined in your browser, never uploaded.

๐Ÿ“Š Drop 2โ€“20 spreadsheet files here, or click to choose

CSV, TSV or Excel (.xlsx) ยท columns are matched by their header names

Free forever ยท nothing uploaded

Remove duplicates in Excel: the three built-in ways

If the files are already merged into one sheet and you just want the duplicates gone, Excel has three tools and they do different things. Pick by what you want to happen to the rows.

MethodWhereWhat it doesUse when
Remove DuplicatesData tab โ†’ Data ToolsDeletes duplicate rows permanently and reports how many wentYou are sure and you have a backup
Conditional formattingHome โ†’ Conditional Formatting โ†’ Highlight Cells Rules โ†’ Duplicate ValuesColours duplicates, deletes nothingYou want to look before you cut
UNIQUE()Any empty cell: =UNIQUE(A2:D5000)Spills a clean copy, leaves the original untouchedExcel 365 or 2021, and you want a live list

Remove Duplicates, step by step. Click any cell in your data, then Data โ†’ Remove Duplicates. Tick My data has headers if the first row is a header. Then the important part: untick every column except the ones that define a duplicate. Leaving all columns ticked means a row only counts as a duplicate when every single cell matches โ€” which is why people run it and nothing happens. Matching on Email alone, or Name + Phone, is usually what you actually want.

The catch nobody mentions: Remove Duplicates keeps the first occurrence and deletes the rest, so if your newest data is at the bottom, you keep the oldest version of each record. Sort newest-first before you run it, or use the merger above, which keeps the most complete row instead of the first one.

Doing it in one step instead

All of the above assumes the files are already one sheet. Merging several workbooks by hand โ€” matching up columns that are in a different order, or named "Email" in one file and "E-mail" in another โ€” is where the time actually goes.

The CSV & Excel merger does both jobs at once: drop in as many .xlsx or .csv files as you like, columns are lined up by header name rather than position, and duplicate rows are removed as it merges. It runs inside your browser, so customer lists and price files are never uploaded anywhere. Download the result as .xlsx or .csv.

Frequently asked questions

Does it handle multiple sheets in one workbook?

Only the first sheet of each file is used. Save other sheets as separate files first.

Are dates and numbers preserved?

Values are kept as text as they appear in the file. Reformat in Excel after export if needed.

Related merge tools

Everything on AIMerger brings things together โ€” here is what pairs with this one.

๐Ÿงฐ Browse all 30+ merge tools โ†’