What is the excel formula to remove duplicate rows
Tutor 5 (87 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Excel does not have a single formula that automatically deletes duplicate rows. Removing duplicates is usually done using built-in features or helper formulas to identify duplicates first.
Method 1: Using the Built-In “Remove Duplicates” Feature
Select the range of cells or the entire table where duplicates might exist.
Go to the Data tab on the Ribbon.
Click Remove Duplicates.
In the dialog box, choose the columns that should be checked for duplicates.
Click OK.
Excel will display a message showing how many duplicate rows were removed and how many unique rows remain.
Note: This method permanently deletes duplicate rows. Keep a backup if needed.
Method 2: Using a Formula to Identify Duplicates
You can use a formula to mark duplicates, then filter or delete them manually.
Suppose your data is in columns A to C, starting from row 2.
In a new column (e.g., column D), enter the following formula in D2:
=IF(COUNTIFS(A$2:A2,A2,B$2:B2,B2,C$2:C2,C2)>1,"Duplicate","Unique")
Drag the formula down to the last row.
Filter column D for Duplicate and delete those rows.
Explanation:
COUNTIFScounts how many times the combination of values in columns A, B, and C has appeared up to the current row.If the count is greater than 1, the row is a duplicate.
Method 3: Using Power Query
Select your table and go to Data → Get & Transform → From Table/Range.
In the Power Query editor, select the columns to check for duplicates.
Click Remove Rows → Remove Duplicates.
Close and load the cleaned table back into Excel.
Power Query is efficient for large datasets and prevents accidental deletion of data.
Notes:
Removing duplicates only considers exact matches. Minor differences in text or spacing will not be detected as duplicates.
Formulas like
COUNTIFSwork for both numeric and text data.The built-in Remove Duplicates tool is faster for small datasets, while formulas or Power Query provide better control for larger or dynamic datasets.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to show duplicates in red
Answers · 1
How to apply duplicate conditional formatting rule
Answers · 1
How to duplicate conditional formatting excel
Answers · 1
What is excel conditional formatting duplicates
Answers · 1