Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Duplicate Checker Excel: How to Find and Remove Duplicates

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To check for duplicates in Excel, the fastest method is using Conditional Formatting to highlight them or the Remove Duplicates tool to delete them instantly. Depending on whether you want to simply see the repeated data or purge it from your spreadsheet, you will use different built-in tools. These features allow you to maintain data integrity, ensure your mailing lists are clean, and prevent accounting errors caused by double-entry.

What You'll Need

  • A computer with Microsoft Excel installed (works on Office 365, Excel 2021, 2019, and 2016).
  • A dataset containing the columns you wish to analyze for repeated values.
  • A backup copy of your file (highly recommended before performing permanent deletions).

Step-by-Step

There are three primary ways to handle duplicates: highlighting them for review, removing them permanently, and using a formula for dynamic checking. Labels and menu paths may vary slightly depending on your version of Excel or your operating system.

Method 1: Highlighting Duplicates (Visual Check)

Use this method when you need to see which entries are repeated before deciding which ones to delete. This is the safest approach for auditing data.

  1. Open your Excel workbook and select the specific range of cells, column, or row you want to check. To select an entire column, click the letter at the top of the column.
  2. Go to the Home tab on the top ribbon.
  3. In the Styles group, click on Conditional Formatting.
  4. Hover over Highlight Cells Rules and then select Duplicate Values... from the fly-out menu.
  5. A dialog box will appear. In the left dropdown, ensure Duplicate is selected. In the right dropdown, choose your preferred formatting style (e.g., "Light Red Fill with Dark Red Text").
  6. Click OK. All cells containing repeated values will now be colored, allowing you to scroll through your list and manually verify the data.

Method 2: Removing Duplicates (Permanent Deletion)

Use this method when you are certain that all repeated entries are errors and should be deleted immediately. Note that this action cannot always be undone easily if the file is saved and closed.

  1. Click any single cell inside your data range or table.
  2. Navigate to the Data tab on the top ribbon.
  3. In the Data Tools group, click the Remove Duplicates button.
  4. A dialog box will appear listing all your columns. If your data has headers (e.g., "Name", "Email", "ID"), make sure the checkbox My data has headers is checked.
  5. Select the columns you want Excel to check.
    • If you select only one column (e.g., "Email"), Excel will delete the entire row if that specific email appears more than once.
    • If you select multiple columns (e.g., "First Name" AND "Last Name"), Excel will only delete the row if the combination of both names is identical.
  6. Click OK. Excel will display a summary message telling you how many duplicate values were found and removed, and how many unique values remain.

Method 3: Using a Formula (Dynamic Checking)

Use this method if you want a status column (e.g., "Duplicate" or "Unique") that updates automatically as you add new data.

  1. Insert a new blank column next to your data. Label it "Duplicate Check".
  2. In the first cell of this new column (assuming your data starts in cell A2), type the following formula: =COUNTIF($A$2:$A$100, A2)>1.
  3. Replace $A$2:$A$100 with the actual range of your data. The dollar signs are critical as they lock the range.
  4. Press Enter. The cell will return TRUE if the value is a duplicate and FALSE if it is unique.
  5. Click the bottom-right corner of the cell (the fill handle) and drag it down to apply the formula to all rows.

Common Mistakes

Many users encounter issues because of how Excel interprets "identical" data. Here are the most frequent errors to avoid:

  • Ignoring Leading or Trailing Spaces: Excel treats "John Doe" and "John Doe " (with a space at the end) as two different values. This is the most common reason why the duplicate checker fails to find obvious repeats.
  • Case Sensitivity Confusion: By default, the Remove Duplicates tool and Conditional Formatting are not case-sensitive. "APPLE" and "apple" are seen as the same. If you need a case-sensitive check, you must use a complex formula involving the EXACT function.
  • Selecting Only One Column in a Multi-Column Dataset: If you select only the "First Name" column to remove duplicates, you might accidentally delete two different people who both happen to be named "Michael". Always select the unique identifier (like an Email or ID number) or multiple columns to ensure accuracy.
  • Forgetting to Back Up: The Remove Duplicates tool is destructive. If you realize later that you needed one of those duplicates for historical tracking, you cannot recover the data unless you have a backup or an undo history available.

Tips

  • Clean Data First: Before running a duplicate check, use the =TRIM() function in a helper column to remove all unnecessary spaces. This ensures that " New York" and "New York " are recognized as the same city.
  • Use Tables: Convert your data range into an official Excel Table (Ctrl + T). When you use the Remove Duplicates tool on a Table, the range expands automatically if you add new rows later.
  • Filter by Color: After using Conditional Formatting to highlight duplicates, you can use the Filter tool (Data > Filter) to filter the column by color. This groups all duplicates at the top of your sheet for easier manual review.
  • The Unique Function: In newer versions of Excel (Office 365), you can use the =UNIQUE() formula. Instead of deleting data from your original list, this formula creates a brand new list in a different area of the sheet containing only the unique values.

Troubleshooting

If the duplicate checker is not working as expected, follow these steps in order:

  1. Check for Hidden Characters: If two cells look identical but aren't highlighted, they likely contain non-printing characters or different space types. Try copying both cells into a plain text editor (like Notepad) to see if there are invisible differences.
  2. Verify Range Selection: Ensure you haven't accidentally selected empty rows at the bottom of your sheet. If you select the entire column, Excel may struggle with performance or include blank cells as duplicates. Select only the active data range.
  3. Refresh Formatting: If you have changed the data but the colors haven't updated, go to Conditional Formatting > Clear Rules > Clear Rules from Entire Sheet, then re-apply the rule.
  4. Check Data Types: Ensure the columns are formatted consistently. If one cell is formatted as "Text" and another as "Number", Excel may not recognize them as duplicates even if they both contain the number 123. Select the column and set the format to "General" or "Text" for both.

Frequently Asked Questions

Can I find duplicates across two different sheets?

The built-in Remove Duplicates tool only works on one sheet at a time. To find duplicates across two sheets, you should use a VLOOKUP or MATCH formula in a helper column on the first sheet to see if the value exists in the second sheet.

Does removing duplicates delete the entire row?

Yes. When you use the Remove Duplicates tool, Excel deletes the entire row associated with the duplicate value, not just the cell in the column you selected. This prevents your data from becoming misaligned.

How do I keep only the first occurrence and delete the rest?

The Remove Duplicates tool automatically keeps the first instance it encounters (the top-most row) and deletes all subsequent occurrences of that value.

Is there a way to count how many times a value is duplicated?

Yes. Use the =COUNTIF(Range, Criteria) formula. For example, =COUNTIF(A:A, A2) will tell you exactly how many times the value in A2 appears in column A.

Can I remove duplicates based on multiple criteria?

Yes. In the Remove Duplicates dialog box, check multiple columns. Excel will then only treat a row as a duplicate if every selected column matches exactly.