To remove duplicate names in Excel, select the name list or the entire related dataset, then choose Data > Remove Duplicates. Confirm which column Excel should check and select OK. Excel keeps the first matching entry and removes later duplicates, so make a copy of your data first if you may need to restore it.
What You’ll Need
- An Excel workbook with the names you want to check.
- Permission to edit the workbook, plus enough room to save a backup or copy of the original data.
- A decision about whether you are removing repeated names alone or deleting entire records that share a name. That choice affects which columns you select.
These instructions are for Microsoft Excel for Microsoft 365 on Windows. The Data tab also contains Remove Duplicates in current Excel for Mac and Excel for the web, although the button’s placement can vary slightly by window size or version.
Step-by-Step
- Make a safe working copy. Save the workbook with a new name, or copy the data to another worksheet before changing it. Remove Duplicates deletes entries in place; it does not create a separate cleaned list, and the change may be difficult to recover after you close the file. If the data is important, keep an untouched source copy.
- Decide what counts as a duplicate. If you have a simple list of names, a repeated name is usually enough to identify a duplicate. If the names belong to customer, employee, or contact records, decide whether two records with the same name are truly the same person. A shared name alone may not be a reliable identifier; you may need to compare an email address, ID, or another field as well.
- Select the correct range. For a standalone list, click a name cell and select the list, including its header if it has one. For a table with other details, select the entire dataset, including all columns that must stay together. Do not select only the Name column in a multi-column table: removing cells from that column alone can leave names out of alignment with their associated details.
- Open the duplicate-removal tool. On the ribbon, choose Data > Remove Duplicates. If Excel asks whether the data has headers, check that the first row contains column labels rather than a name to be processed. The dialog may show a My data has headers checkbox; select it when appropriate.
- Choose the column or columns to compare. In a name-only list, select the Name column. In a multi-column dataset, the dialog displays the available headers. Select only Name if you want Excel to remove later records whenever the name repeats, regardless of their other details. Select several columns if a duplicate should mean that the values in all those selected columns match. For instance, choosing Name and Email keeps two people with the same name when their email addresses differ.
- Check your selection before confirming. Look at the column names in the dialog and make sure the correct comparison rule is selected. If the data has a header row, confirm Excel is treating it as a header. When you select multiple columns, Excel considers a row a duplicate only when the selected values match across those columns; unselected fields do not prevent a row from being removed.
- Remove the duplicates. Select OK. Excel removes later rows that match the chosen comparison columns and keeps the first occurrence it finds. A message reports how many duplicate values or rows were removed and how many unique values remain. Read that summary and scan the resulting list to check that the outcome makes sense.
- Review the cleaned data. Check several names near the top, middle, and bottom of the list. In a dataset, verify that the details still belong to the right names and that no legitimate records with the same name were lost. If the result is wrong, use Ctrl+Z on Windows immediately to undo, then reconsider the selected range and comparison columns. On Mac, use Command+Z.
For example, suppose a contact table has Name, Email, and City columns. If you select the full table and compare only Name, Excel keeps the first record for a name and removes later records with that name, even if the email or city differs. If instead you compare Name and Email, it removes only records where both selected values match. Make this decision before clicking OK, because the first approach can discard useful information about people who share a name.
If you want a separate list rather than changing the source, Microsoft 365 also offers the UNIQUE function. With names in A2:A10, enter =UNIQUE(A2:A10) in an empty cell outside the source list. It spills a list of distinct names while leaving the original data untouched. For example, if A2:A10 contains Maya, Liam, Maya, Noah, Liam, Ava, Noah, Ava, and Maya, the result is Maya, Liam, Noah, Ava in the order of first appearance. UNIQUE is available in Microsoft 365 and Excel 2021 or later; it is not the same as deleting duplicates from the original cells.
Common Mistakes
- Selecting just one column from a multi-column table. If Excel prompts you to expand the selection or continue with the current selection, choose the option that includes the whole dataset when related information must stay with each name. Then use the dialog’s column checkboxes to specify what identifies a duplicate.
- Comparing too many columns. If you select Name, Email, and City, rows with the same name and email but different cities will be treated as different records. Select only the fields that define a duplicate for your task.
- Comparing too few columns. Checking only Name can remove separate people who share a name. Include a unique field such as email or customer ID when preserving different people matters.
- Forgetting the header setting. If the first name is mistakenly treated as a header, it will not be checked. If a header is treated as a name, it can be included in the comparison. Confirm the checkbox before continuing.
- Assuming names that look alike are identical. Extra spaces or other hidden characters can make two entries different to Excel. Capitalization differences are generally not a dependable way to distinguish people during duplicate removal, so use a unique identifier when identity matters.
Tips
- Sort a copy first. Sorting the names from A to Z can make repeated entries easier to inspect. If you sort a table, sort the entire table so each row’s details move together. Sorting does not remove duplicates by itself.
- Keep a record of the original count. Note how many rows you started with and compare that number with Excel’s completion message. A surprisingly large number removed is a reason to undo and review the comparison settings.
- Standardize inconsistent spacing. Names copied from email, websites, or other systems may contain leading or trailing spaces. You can clean a copy in a helper column before deduplication. With names in A2:A20, enter
=TRIM(A2)in B2 and fill down through B20. The formula returns each name without ordinary extra spaces at the beginning or end, and reduces repeated internal spaces to one. Review the cleaned results before replacing or comparing the original values. - Use a helper identifier for careful matching. If names are not enough to identify a person, compare a combination such as name and email in the Remove Duplicates dialog. Keep an original copy, because the tool removes entire rows based on the selected fields rather than marking potential matches for review.
- Use a formula when you need a live result. UNIQUE creates a distinct list that updates as its source changes, as long as the formula’s source range includes the new entries. Remove Duplicates is better for permanently cleaning a fixed copy; it does not automatically update when new data is added.
Troubleshooting
Excel says no duplicates were found. First check that the right range and column are selected. If entries appear identical but are not being matched, inspect for spaces or hidden characters. Try the TRIM helper-column method on a copy, then compare the cleaned values. Also check that the table does not contain variations such as a middle initial, punctuation, or a different spelling.
Too many names or records disappeared. Undo immediately with Ctrl+Z on Windows or Command+Z on Mac if the workbook is still open and the action is the most recent change. Repeat the process using a backup. In a contact table, select all columns to keep records together, then select Name plus an additional identifying field in the dialog. Do not assume two matching names represent the same person.
The first name is missing from the results. Reopen the process on a fresh copy and check whether the first row was marked as a header. If the range has no header, clear the header checkbox. If it does have a header, include the header row in the selected range and check the box so Excel excludes that label from duplicate checking.
The button is unavailable or the workbook will not let you edit. Confirm that you have selected a cell in the data and that the sheet is not protected. If it is protected, you may need permission or the password to unprotect it. A shared or read-only workbook may also prevent changes; save an editable copy if you have permission. In Excel for the web, open the Data tab and look for Remove Duplicates; if the command is not available in your current view, open the workbook in the desktop app.
The UNIQUE formula shows an error or does not spill. UNIQUE requires Microsoft 365 or Excel 2021 and later. Make sure the formula is entered in a blank cell with empty cells below it for the results. If existing content blocks the spill range, clear those cells or move the formula. Older Excel versions can use the built-in Remove Duplicates command instead.
Frequently Asked Questions
Does Remove Duplicates keep the first or last name?
It keeps the first occurrence it encounters in the selected range and removes later matching entries. If a particular record should be kept, sort or arrange the data before removing duplicates, and work on a copy.
Can I remove duplicates from one column without deleting other information?
For a table, select the whole dataset and choose the name column in the Remove Duplicates dialog. Excel then removes entire duplicate rows and keeps the remaining row data together. Removing values from a single column separately can misalign the records.
Can Excel distinguish two people with the same name?
Not from the name alone. Select an additional field, such as email address or an ID, so Excel only removes rows that match on those fields. Review matches when the identifier may also be shared or incomplete.
Does Remove Duplicates change the original data?
Yes. It removes duplicate entries from the selected range rather than making a new list. Save a copy first, or use UNIQUE in a blank area if you want a separate distinct list and have Microsoft 365 or Excel 2021 or later.
Can I remove duplicates while keeping the list in its current order?
Yes. Remove Duplicates keeps the first occurrence and leaves the remaining entries in their existing order. Avoid sorting if the original order matters, and check the output after removal.
Will Excel remove names that differ only by capitalization?
Do not rely on capitalization to distinguish people when using duplicate removal. If two entries may refer to separate people, compare another identifying field, such as email or ID, and review the proposed matching rule before confirming.
Related
- Insert a Personal Signature in Word Online: Steps and Tips
- How to Insert Multiple Tables of Contents in Word
- How to Add a New Section to a Word Table of Contents
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Create a Filter View in Google Sheets for YourselfTo create a filter that changes your view without changing what collaborators see, open the spreadsheet in a…
- How to Insert a Signature Line in WordIn Word for Microsoft 365 on Windows, click where the signature should go, then choose Insert > Text…
- Google Finance Codes for Sheets: Tickers and ExamplesIn Google Sheets, “Google Finance codes” usually means the ticker symbol and, when needed, its exchange prefix used…
- Excel Hide Page Break Dotted Lines: What to ChangeTo hide page-break dotted lines in Excel for Microsoft 365 on Windows, open File > Options > Advanced,…
- Excel Name Box: Change a Range or Named RangeTo select a different cell range, click the Name Box to the left of the formula bar, type…
- Hanging Indent in Word: Use Ctrl+TTo create a hanging indent in Microsoft Word for Windows, click in the paragraph or select the paragraphs…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.