Yes. In Excel for Microsoft 365 on Windows, select your data, choose Data > Remove Duplicates, select the columns that define a duplicate, and confirm. Excel keeps the first matching row and removes later matches, so make a copy first if you may need the original data.
What Excel means by a duplicate
A duplicate is determined by the columns you choose, not necessarily by whether two entire rows look identical. For example, a customer list might contain the same email address on multiple rows but different order dates. If you select only the email column in the Remove Duplicates dialog, Excel treats those rows as duplicates and keeps one row. If you select both email and order date, it removes a row only when the combination of those two values repeats.
This distinction matters because removing duplicates changes the data, rather than merely marking repeated values. The tool keeps the first occurrence in the current row order and deletes the other matching rows. If you want to keep the newest customer record, for instance, sort the records by date first so the row you want to retain comes first. Check that the sorting uses the complete data range; sorting just one column can detach values from their associated records.
Excel compares cell contents for this task, not visual formatting. Two cells that look alike may not be equal if one contains a trailing space, a different number stored as text, or another underlying difference. Conversely, differences in font, fill color, or number format alone do not make values distinct. The duplicate-removal comparison is not case-sensitive, so entries such as “North” and “north” are treated as the same when their selected-column values otherwise match.
Remove duplicate rows step by step
- Save a copy of the workbook, or duplicate the worksheet, if the original rows might be needed later.
- Click a cell inside the dataset. If the range has headers and is arranged in a continuous block, Excel can usually detect the full region. For more control, select the exact range, including its header row.
- On the ribbon, choose Data > Remove Duplicates.
- In the dialog, confirm whether My data has headers is selected correctly. Select or clear the column checkboxes to define what makes a row a duplicate.
- Choose OK. Excel reports how many duplicate values were found and removed, and how many unique values remain. Review the resulting data before saving over the only copy.
Suppose a table contains Customer, Email, and City. To retain one row per email address, select Email only in the dialog. To retain one row per person-and-city combination, select Customer and City. Selecting every column means Excel removes only rows whose values match across every selected column. That is often appropriate for exact duplicate records, but it will not consolidate a customer’s separate orders.
If Excel asks whether to expand the selection or continue with the current selection, choose carefully. Expanding includes adjacent columns in the sort or operation; continuing with the current selection may leave related data behind. In a table with names, phone numbers, and addresses, removing duplicate names from only the name column can make the remaining rows misleading. Usually, select the full table and use the dialog’s checkboxes to specify the duplicate key.
Choose the columns that define a match
The right selection depends on the question the data should answer. For an inventory list, a product code may uniquely identify an item, even if its description changes slightly. For a contact list, email address may be a useful key, while a shared family name is not. For transaction data, repeated customer IDs are expected and do not mean the transactions themselves are duplicates.
- Exact repeated records: Select all columns that make up the record. Rows with any differing selected value remain.
- One row per identifier: Select the identifier column, such as an account number or email address, and decide which occurrence should be kept before removing the rest.
- Repeated combinations: Select the set of fields that forms a key, such as product code plus warehouse.
Before deleting anything, ask whether repeated values are errors or meaningful events. An order spreadsheet may correctly contain the same buyer on many rows. Removing duplicate buyers there would erase legitimate purchases. Removing duplicate order IDs, by contrast, may be appropriate if each ID should appear only once.
Preview duplicates without deleting them
If you are unsure what will be removed, highlight or count repeats first. For one column, Excel’s built-in conditional formatting can mark duplicate values: select the cells, then choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. This changes formatting, not the data, and gives you a chance to inspect the repeated entries. It may highlight every occurrence of a repeated value, so it does not by itself identify which row the removal tool will keep.
For a more targeted check, a formula can label later occurrences in a list. With values in A2:A100, enter this formula in B2 and fill it down:
=COUNTIF($A$2:A2,A2)>1
For the assumed layout, the first occurrence returns FALSE and later occurrences return TRUE; the formula counts how often the current value has appeared from the first data row through the current row. Filter the helper column to TRUE to review candidates. Blank cells can also be counted as repeats, so decide whether blank entries should be excluded before acting.
For rows that are duplicates only when both columns A and B match, with data beginning in row 2 and the check formula placed in C2, use:
=COUNTIFS($A$2:A2,A2,$B$2:B2,B2)>1
Fill it down to mark later occurrences of each A-and-B combination. These formulas are useful for review because they do not delete rows. They also make the rule visible, which can help when another person needs to understand why a record was flagged.
Use UNIQUE to create a separate clean list
In Microsoft 365, a dynamic-array formula can return unique values or rows without changing the source data. With a list in A2:A100, enter this in an empty cell outside the source range:
=UNIQUE(A2:A100)
Excel spills the distinct values into cells below the formula. With a table in A2:C100, this version returns distinct whole rows, considering all three columns together:
=UNIQUE(A2:C100)
UNIQUE is available in Microsoft 365 and Excel 2021 or later. It is a good choice when you want a live result that updates as the source changes, or when you want to preserve the original list. It does not remove duplicate rows from the source. Also, applying UNIQUE to several columns compares the complete rows; it does not automatically return one complete row per unique value in just one selected column. If you need to choose which associated row to keep, sort or filter deliberately and verify the result.
Why duplicate removal can miss apparent matches
Extra spaces are a common cause of unexpected results. “Maple Road” and “Maple Road ” may look identical on screen but contain different text. Imported data can also include nonbreaking spaces or inconsistent punctuation. Clean and inspect the relevant fields before removing duplicates; trimming ordinary spaces may help, but unusual imported characters can require additional cleanup.
Other potential differences include a number stored as text versus a numeric value, dates with different underlying times, and inconsistent abbreviations. A date displayed as 3/4/2026 could include a time value that is hidden by the cell’s format. If records should match despite such differences, standardize the fields first—for example, normalize dates or identifiers—then compare the standardized columns. Do not assume that identical-looking display means identical stored values.
There is also a different kind of mismatch: values that are close but not equal. “Jon Smith” and “John Smith” are not exact duplicates, and Remove Duplicates will not infer that they refer to the same person. Fuzzy matching or manual review may be needed for misspellings and inconsistent names. Exact duplicate removal is not a substitute for deciding which records represent the same real-world entity.
Excel for Mac, the web, and tables
In Excel for Mac, the Remove Duplicates command is available from the Data tab, though ribbon layout and dialog appearance can vary by release. The basic process and the need to choose the correct columns are the same. On Mac, common undo uses Command+Z; on Windows, use Ctrl+Z. Undo is useful immediately after an accidental removal, but a saved backup is safer than relying on undo history.
Excel for the web also provides duplicate removal from the Data tab in supported current versions. Its interface may differ from the Windows desktop dialog, so check the available command and selection before confirming. If the workbook is important or the command is unavailable in a particular environment, open it in the desktop app or make a separate copy for cleanup.
When data is formatted as an Excel table, use the table’s full set of columns when you want to remove records while keeping each row’s fields together. The table can make the range easier to identify and expand as records are added, but it does not change the meaning of the selected duplicate columns. Review formulas, totals, and any linked reports that depend on the rows after removing records.
When Power Query is a better fit
For recurring imports, Power Query can make cleanup repeatable. In Excel for Microsoft 365 on Windows, select the data and use Data > From Table/Range to open the Power Query Editor. Select the column or columns that define a duplicate, then choose Home > Remove Rows > Remove Duplicates. Choose Close & Load to return the result to Excel. On a later refresh, Power Query can apply the recorded transformation to updated source data.
Power Query is useful when the same cleanup must be performed again, such as on a monthly export. It preserves the query steps, unlike a one-time deletion from the source worksheet. Still, confirm which columns are selected and inspect the loaded result: removing duplicates by customer ID will retain one record per ID, not necessarily combine information from all records. If which occurrence is retained matters, arrange or sort the data appropriately and verify the output.
Frequently Asked Questions
Does Excel keep the first or last duplicate?
Remove Duplicates keeps the first occurrence in the current order and removes later matching rows. Sort the complete dataset first if a particular record, such as the newest one, should be kept.
Can I remove duplicates based on only one column?
Yes. In the Remove Duplicates dialog, select only that column as the matching rule. Excel removes entire repeated rows from the selected data range, not just repeated cells in that column, so include the full table in the operation.
Can I undo Remove Duplicates?
Usually, you can undo it immediately with Ctrl+Z on Windows or Command+Z on Mac. Undo history can be lost after other actions or closing the workbook, so keep a copy before removing data you may need.
Does Remove Duplicates distinguish uppercase and lowercase?
No. Its comparison is not case-sensitive, so capitalization alone does not make otherwise matching selected values unique. If case must matter, use a deliberate helper-column or formula-based approach and verify the result before deleting records.
How can I find duplicates without deleting them?
Use Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, or use a COUNTIF or COUNTIFS helper formula to flag repeated values or combinations. Both let you inspect records before making changes.
Why does Excel still show two entries that look the same?
They may differ in a hidden space, stored data type, date/time value, or another underlying character. Inspect and standardize the relevant fields, then run the duplicate check again. Similar-looking names with spelling differences are not exact matches.
Related
- Bloomberg Excel Add-In Repair and Troubleshooting
- Bill Paying Checklist Excel Template: Build One That Works
- Billing Invoice Template Excel: Setup and Key Details
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Cell Merge Shortcut Keys and How to Use ThemIn Excel for Microsoft 365 on Windows, select the cells and press Alt+H, M, then C to use…
- Power Query String Length: How to Count CharactersIn Power Query, use Text.Length([ColumnName]) to return the number of characters in a text value. For example, add…
- Delete a Page in Word with Ctrl+G: Step-by-Step GuideTo delete a page in Microsoft Word on Windows, click in the page you want to remove, press…
- Martin Lewis Budget Spreadsheet: Find or Build OneIf you’re looking for a Martin Lewis budget spreadsheet, the official MoneySavingExpert (MSE) option is its free online…
- How to Split Cells in Excel for the WebTo split text in a cell into separate columns in Excel for the web, select the cells, choose…
- Open Notepad with Excel: Use Both or Import Text FilesYes—you can open Notepad while Excel is running and use the two programs side by side. If you…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.