Your Search Bar For Shrewd Tips

How Do I Clear Duplicate Values In Excel?


Duplicate values can make an Excel list harder to read, lead to incorrect counts, and create problems when you sort, filter, or analyze data. Fortunately, Excel includes several ways to find and clear duplicates. You can remove repeated records permanently, highlight duplicates before deciding what to do, or create a separate list containing only unique values.

The best method depends on what you mean by “duplicate.” You might want to remove repeated entries from one column, delete entire rows that match across several columns, or simply identify repeated values without changing your original data. This guide explains how to clear duplicate values in Excel safely, step by step.

Before You Remove Duplicates in Excel

Before changing a worksheet, make a copy of the data or save a backup of the workbook. Excel’s Remove Duplicates command deletes records from the selected range. Although you can often undo the action immediately, a backup gives you a safer way to recover your original list later.

Check that your data is arranged in a clear table, with one record per row and a header at the top of each column. Remove blank rows and make sure the columns you want to compare are easy to identify. If your range contains related information, such as a customer name and email address, keep the complete rows together rather than removing duplicates from just one column.

Also decide how Excel should define a duplicate. Two rows may have the same email address but different names, or the same name but different account numbers. Selecting different columns in the removal dialog can produce different results.

How to Remove Duplicate Values with Excel’s Built-In Tool

The quickest way to clear duplicates from a list is to use Excel’s Remove Duplicates feature. It can check one column or several columns and remove repeated values or records from the selected range.

  • Select a cell in your data, or select the full range you want to clean.
  • Open the Data tab on the ribbon.
  • Choose Remove Duplicates in the Data Tools group. In some versions or window sizes, the command may appear in a menu.
  • If your selection includes column headings, select My data has headers.
  • In the dialog box, check the columns Excel should use to identify duplicates.
  • Choose OK, then review the message showing how many duplicate values or rows were removed and how many unique records remain.

Excel keeps the first occurrence it finds and removes later records that match the selected columns. For example, if you select only the Email column, Excel treats rows with the same email address as duplicates, even if the other information in those rows differs. If you select Name, Email, and City, Excel removes a row only when the values in all three selected columns match another row.

To remove repeated values from a single column, select the column’s data and choose only that column in the dialog. To remove duplicate records, select all the relevant columns. Be careful when selecting only one field in a multi-column table: Excel may remove a whole row based on a match in that field, taking the other information in the row with it.

How to Find Duplicates Before Deleting Them

If you are not ready to permanently remove records, highlight duplicates first. Conditional formatting makes repeated values visible while leaving your data unchanged.

  • Select the cells you want to check.
  • Go to Home and choose Conditional Formatting.
  • Select Highlight Cells Rules, then Duplicate Values.
  • Choose a formatting style, such as a colored fill, and select OK.

Excel highlights values that occur more than once in the selected range. This is useful for reviewing a list before removal, spotting repeated invoice numbers, or checking whether customer emails appear multiple times. You can filter or sort by the highlighting to inspect the matching records more closely.

Conditional formatting can also highlight unique values instead. In the Duplicate Values dialog, change the option from Duplicate to Unique. This helps you isolate entries that appear only once. Keep in mind that formatting identifies matches; it does not delete or change the underlying values.

How to Use a Formula to Identify Duplicate Values

A formula gives you more control over how duplicates are identified. For example, you can add a helper column that labels each entry as a duplicate or unique, then filter the results before deleting anything.

If the values you want to check are in column A, starting in cell A2, enter this formula in B2:

=IF(COUNTIF($A$2:A2,A2)>1,"Duplicate","Unique")

Copy the formula down the helper column. It labels the first occurrence of each value as Unique and each later occurrence as Duplicate. You can then filter the helper column to show duplicate rows and review them. This method is especially useful if you want to keep the first entry and remove only later repeats.

To mark every occurrence of a value that appears more than once, use:

=IF(COUNTIF($A:$A,A2)>1,"Duplicate","Unique")

Unlike the first formula, this version labels the first occurrence as a duplicate too, because it checks the entire column. In either case, adjust the cell references to match your data. If your list has a header, begin with the first data row rather than the heading.

To check whether a combination of fields is repeated, you can use COUNTIFS. For example, if the name is in column A and the email address is in column B, enter this formula in C2:

=IF(COUNTIFS($A:$A,A2,$B:$B,B2)>1,"Duplicate","Unique")

This checks whether the same name-and-email combination appears more than once. You can use additional criteria ranges when you need to compare more columns. After reviewing the labels, filter for duplicates and decide which records to remove.

How to Create a Separate List of Unique Values

Sometimes you want to keep your original data and create a clean list elsewhere. If you use a recent version of Excel, the UNIQUE function can return distinct values in a new range. For values in A2:A100, enter:

=UNIQUE(A2:A100)

Excel displays a list of values that appear only once in the sense of one entry per distinct value; values that occur multiple times in the source still appear once in the result. The output is dynamic, so it updates when the source range changes. If you want the results sorted, you can combine the functions:

=SORT(UNIQUE(A2:A100))

To return unique rows based on multiple columns, provide a range covering those columns, such as =UNIQUE(A2:C100). Excel compares complete rows in that range. The function is available in Microsoft 365 and newer Excel versions that support dynamic arrays. If Excel displays a #NAME? error, your version may not support the function.

Another option is Advanced Filter, which is available in many desktop versions of Excel. Select your data, open Data > Advanced, choose Copy to another location, specify where to place the results, and check Unique records only. This creates a separate set of unique records without deleting the source list.

How to Remove Duplicates in Excel with Power Query

Power Query is useful when you regularly import and clean data. It lets you remove duplicates in a repeatable process, then refresh the query when the source data changes.

  • Select a cell in your data and choose Data > From Table/Range. If prompted, confirm that your data has headers.
  • In the Power Query Editor, select the column or columns that define a duplicate.
  • Open the Home tab and choose Remove Rows > Remove Duplicates.
  • Select Close & Load to return the cleaned results to Excel.

Power Query keeps one occurrence for each distinct value or selected-column combination. Because the transformation is recorded in the query, you can refresh it as new source data arrives. This is a good choice for recurring reports, large datasets, or workflows that involve several cleaning steps.

Common Issues When Clearing Duplicates

Extra spaces can make matching values appear different. For example, “Morgan Lee” and “Morgan Lee ” may not be treated as identical because the second value contains a trailing space. You can clean text with the TRIM function in a helper column, then copy the results and use Paste Special > Values if you want to replace the original text.

Different number formats may hide matching data. A value stored as text may not behave like the same value stored as a number. Check the cell format and convert entries consistently before removing duplicates.

Capitalization usually does not create a separate duplicate for Excel’s built-in removal tool. For many standard duplicate checks, Excel treats text matches without distinguishing between uppercase and lowercase. If case matters in your data, use a formula designed for case-sensitive comparison, such as one that combines EXACT with a counting approach.

Blank cells need attention. If a selected column contains several blank cells, Excel may treat repeated blanks as duplicates when you remove duplicates. Decide whether blank entries should be kept, removed, or ignored before running the tool. You can filter for blanks first if you want to handle them separately.

Choosing the wrong columns can remove valid records. If two customers share a name but have different email addresses, selecting only the Name column may cause Excel to remove one of them. Select all fields needed to define a truly identical record.

Which Excel Duplicate-Removal Method Should You Choose?

Use Remove Duplicates when you are confident that repeated entries should be deleted from the selected range. Use Conditional Formatting when you want to inspect matches without changing your data. Choose a formula when you need labels, filters, or custom duplicate logic. Use UNIQUE or Advanced Filter to create a separate list, and choose Power Query for repeatable data-cleaning tasks.

For important records, a cautious workflow is often best: make a backup, highlight duplicates, confirm which columns define a duplicate, and then remove or extract the matching entries. This helps protect valid records that happen to share one value.

Conclusion

Clearing duplicate values in Excel can take just a few clicks, but the right approach depends on whether you want to delete repeated rows, identify matches, or create a separate unique list. Excel’s Remove Duplicates tool is the fastest option for straightforward cleanup, while conditional formatting, formulas, Advanced Filter, and Power Query provide more control. Check your data and choose the columns carefully before removing records, and keep a backup whenever the original information matters.


Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.

Shrewdnia

Shrewdnia

Shrewdnia is a destination for curious minds seeking clarity, knowledge, and informed perspectives. Through insightful articles and practical guides our passionate team explores a wide range of topics designed to help readers understand the world around them, make smarter decisions, and stay informed in an ever-changing landscape.


💡 Every question sparks discovery, and every perspective enriches the conversation. Share your thoughts and insights in the comments 👇

Back to blog

Leave a comment

JOIN THE SHREWDNIA COMMUNITY FORUM

What do you think?

Have an opinion, experience, or question about this topic? Join the Shrewdnia Forum and share your thoughts with other readers.

Join the Forum →