How to Remove Duplicates in Excel: A Practical Guide

Master practical methods to remove duplicates in Excel using built-in tools, Advanced Filter, formulas (UNIQUE, COUNTIF), and Power Query. Safe steps, real-world tips, and best practices for clean, accurate data in 2026.

XLS Library
XLS Library Team
·2 min read
Remove Duplicates in Excel - XLS Library
Photo by Bru-nOvia Pixabay
Quick AnswerSteps

Goal: remove duplicate rows from your dataset in a safe, repeatable way. Start by backing up your workbook, select the data range, and choose a method. Use Excel’s built‑in Remove Duplicates for quick cleanups, Advanced Filter for non-destructive options, formulas like UNIQUE or COUNTIF for dynamic results, or Power Query for large datasets.

Understanding duplicates in Excel and why they matter

If you're wondering how to remove duplicates in Excel, you're not alone. Duplicates can creep into datasets through copy-paste, imports, or repeated transactions, and they can distort totals, skew averages, and hide patterns. According to XLS Library, clean datasets depend on disciplined deduplication to preserve context and accuracy. In practice, deduplication isn’t just a one-off task; it’s a repeatable process that you can automate or semi-automate to maintain data quality over time. In this section we’ll explore what qualifies as a duplicate, why duplicates appear, and how your choice of columns defines what gets removed. Remember: context matters. A duplicated row might be legitimate in some business scenarios (e.g., recurring invoices) but problematic in others (e.g., customer contact records). By setting a clear rule about which columns count toward duplicates, you set the foundation for accurate reporting and clean data that supports reliable dashboards and forecasts. This clarity will guide the methods we cover later, from built-in cleanup to Power Query automation.

From a data integrity perspective, duplicates aren’t just a nuisance; they are a signal about data collection processes. If you consistently find duplicates in a particular field (like a customer ID or order number), that’s a cue to review upstream data sources or create a standard to prevent duplicates at entry. In practice, you’ll want to define what constitutes a duplicate for your dataset: is it identical rows across all columns, or is a subset of columns sufficient to mark a duplicate? Once you have this rule, you can choose the most appropriate cleanup method with confidence. As you proceed, always preserve a backup copy and validate your results with quick checks like counts before and after deduplication, or reconciliations against a pivot table. These habits help ensure your final dataset remains trustworthy for analysis and reporting.

Why duplicates matter in everyday Excel work

In many business contexts, duplicates inflate totals, misrepresent engagement metrics, or skew inventory counts. For example, a list of customers with repeated entries can make it seem like you have more customers than you actually do, which distorts marketing reach and revenue projections. Conversely, not all duplicates are harmful; in some datasets, repeated rows correspond to legitimate events (like repeated orders on the same day). The key is to establish a documented rule for when a duplicate should be removed and when it should be kept for historical integrity. The rule should specify which columns define a duplicate. If two rows share the same customer ID and order date, are they truly duplicates or two separate orders? Your policy should answer that question, or your deduplication results will be inconsistent across reports. In short, a clear duplication policy reduces ambiguity and saves time during audits and updates. The method you choose should align with your data model and your reporting requirements, so you can trust the cleaned data every time you refresh a dashboard or run a reconciliation.

Tools & Materials

  • Excel (Windows or Mac)(Ensure your version supports the method you plan to use (UNIQUE requires Office 365/2021 or later).)
  • Backup copy of the workbook(Create a separate file before deduplication to safeguard original data.)
  • Original dataset organized in a single table or contiguous range(Headers should be clearly defined to make column selection accurate.)
  • Power Query (optional for older Excel, included in modern Excel)(Use when dealing with very large datasets or when you want repeatable cleansing steps.)
  • Internet access (optional)(Useful for consulting online references or templates if needed.)

Steps

Estimated time: 15-25 minutes

  1. 1

    Select the data range

    Choose the exact range that contains your data, including headers if you want to consider them. This ensures Excel evaluates the correct rows and columns when identifying duplicates.

    Tip: If your data is in a table, select the entire table to keep formatting.
  2. 2

    Open the Remove Duplicates dialog

    Go to the Data tab and click Remove Duplicates. This opens a dialog where you can specify which columns define a duplicate.

    Tip: Excel pre-selects all columns; deselect any that should be ignored for duplicate checks.
  3. 3

    Choose columns to define a duplicate

    Select the columns whose combination should be treated as a duplicate. For example, you might consider duplicates only if both CustomerID and InvoiceDate match.

    Tip: Be deliberate: fewer columns mean broader matches; more columns mean stricter matches.
  4. 4

    Run the cleanup and review results

    Click OK. Excel will remove duplicate rows and show a dialog with how many duplicates were removed and how many unique rows remain.

    Tip: Sort the remaining data by a key field (like date or ID) to verify the first occurrence is sensible.
  5. 5

    Alternative: use Advanced Filter for unique records

    If you want to preserve the original data, copy the range and apply Advanced Filter with Unique records only to the copy.

    Tip: Copy to a new location to keep your original dataset intact for comparison.
  6. 6

    Validate the results and document your rule

    Count rows before and after deduplication, and compare totals with pivot tables or summaries to confirm accuracy.

    Tip: Document the columns used for de-duplication to ensure repeatability in future cleans.
Pro Tip: Always back up before deduping to prevent data loss and enable rollback.
Warning: If your dataset uses a composite key, verify that all relevant columns are included in the duplicate check.
Note: In Excel Tables, Remove Duplicates may behave differently; ensure headers are recognized to avoid confusion.
Pro Tip: After deduping, sort by a meaningful column (date, ID) to confirm the first occurrence retains the correct context.

People Also Ask

How do I remove duplicates in Excel quickly?

Use the built-in Remove Duplicates tool for a fast cleanup by selecting your range, choosing the key columns, and confirming. Review the summary after Excel finishes to confirm how many rows were removed.

Use the Remove Duplicates tool in the Data tab to quickly clean your dataset, then review the summary to confirm the changes.

Can I remove duplicates across multiple columns or only the entire row?

You can define duplicates by selecting multiple columns. If you want duplicates removed based on the entire row, select all columns. If you want to keep rows with identical values in some columns, choose only the relevant ones.

Yes. Pick the columns that define a duplicate; for whole-row duplicates choose all columns.

What happens to the first occurrence when removing duplicates?

Excel keeps the first instance and removes subsequent duplicates, unless you sort the data beforehand to determine which rows remain. Always back up before performing the operation.

Excel keeps the first matching row by default and removes the rest; you can sort to decide which to keep.

Is there a way to keep duplicates but mark them instead?

Yes. Use a helper column with a formula like COUNTIF to flag duplicates, then filter or style the flagged rows instead of deleting them.

You can flag duplicates with a formula and review them without deleting anything.

How do I remove duplicates in Excel for Mac?

The steps are similar on Mac: select the range, go to Data, choose Remove Duplicates, and pick the columns that define duplicates. For large datasets, Power Query options are available in newer macOS versions.

Mac users can use the same Remove Duplicates tool; Power Query is available in recent versions.

Does Excel's UNIQUE function dynamically update when the source data changes?

UNIQUE returns a dynamic array that updates when the source data changes (Excel 365/2021+). If you’re on an older version, use a combination of INDEX/COUNTIF or a helper column instead.

UNIQUE creates a live list that updates with your data in compatible Excel versions; older versions need workarounds.

The Essentials

  • Back up data before deduping to safeguard originals.
  • Define duplicates by selecting appropriate key columns.
  • Choose a method that fits dataset size and workflow.
  • Always verify results with a secondary check (pivot or filters).
Process for removing duplicates in Excel
Process overview: remove duplicates in Excel

Related Articles