How do you remove duplicates across multiple Excel files?
By Kayabyte · Last updated 31 October 2026
Excel’s Remove Duplicates works on one sheet, so to remove duplicates across several files you first bring the rows into one sheet and then remove duplicates there. On a Mac that means copying the data together by hand or with Power Query’s Append, then Data, Remove Duplicates. Gridhand does the same in two steps: stack the files into one sheet with a Source column, then remove duplicates by the columns you pick.
Manual method
- Put all the rows under one header in a single sheet: paste the files under each other, or append queries in Power Query. See combine Excel files into one sheet.
- Add a column with the file name before you paste, so you can see where each row came from.
- Select the data and choose Data, Remove Duplicates. Tick only the columns that define a duplicate (an email address, an order number), not all of them.
- Excel keeps the first occurrence of each row and tells you how many it removed.
To find duplicates without deleting
- Add a helper column with
=COUNTIF(B:B,B2)>1over the key column and filter on TRUE. - To check one file against another, use
=COUNTIF([other sheet range],B2)>0after copying the other file’s key column into your workbook, or XLOOKUP to flag matches.
Traps
- Hidden spaces and different letter case: “ann@x.com” and “Ann@x.com” are not identical to a quick formula. Trim first (see clean Excel files in bulk).
- Removing across all columns when only the ID should match.
- Deleting rows with no way back. Work on a copy.
With Gridhand
Gridhand Clean removes duplicates within each file, so for duplicates across files stack the files first: Merge, “Into one sheet”, with the source file option ticked. Then run Clean on the result with only “Remove duplicates” on, and choose the columns that make a row a duplicate. The first row of each group stays, header rows are kept, and the report counts what was removed. Trim spaces in the same run if the keys have stray spaces. Your original files are never modified; every step writes new files.
Steps with Gridhand
- Drop the files into Gridhand, choose Merge and “Into one sheet (stack the rows)”, tick the source file option, and run it.
- Add the merged file to Clean, tick “Trim spaces” and “Remove duplicates”, and pick the key columns.
- Check the preview counts, choose an output folder and press Run.
Free for up to 3 input files per run; Gridhand Pro is USD 49 once. Download Gridhand
Questions
Does Gridhand remove duplicates between separate files without merging? No. Clean works on each file by itself, so stack the files into one sheet first, as above.
Which duplicate is kept? The first one. The Source file column tells you which file it came from.
Are header rows kept? Yes. Header rows are kept and only data rows are compared.
Related guides
Microsoft and Excel are trademarks of the Microsoft group of companies. Gridhand is made by Kayabyte and is not affiliated with or endorsed by Microsoft.
More guides
- Is there an ASAP Utilities for Mac, and what can you use instead?
- How do you batch convert CSV files to XLSX on a Mac?
- How do you combine multiple CSV files into one Excel workbook on a Mac?
- How do you compare two Excel files on a Mac?
- How do you convert XLSX to CSV on a Mac, for every sheet and many files?
- How do you find and replace in multiple Excel files on a Mac?
- Gridhand vs XLclick vs XLWizard: which Excel tool for Mac?
- Is there a Kutools for Mac, and what are the alternatives for Mac?
- How do you merge Excel files on a Mac?
- Can you use Power Query on a Mac to merge Excel files?
- How do you split Excel data into one file per customer, region or month on a Mac?
- How do you split an Excel workbook into one file per sheet, or every N rows, on a Mac?