What is the easy way to find duplicates in excel
Tutor 5 (62 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
The easy way to find duplicates in Excel is through Conditional Formatting, which highlights duplicate values instantly without formulas. Select your data range, navigate to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, choose a format color, and click OK. Excel offers additional methods including the COUNTIF function, Remove Duplicates feature, UNIQUE function, and Power Query for different data management needs.
How to find duplicates using conditional formatting
Conditional Formatting provides the fastest visual method to identify duplicates in Excel. This approach highlights individual cell values that appear more than once in your selected range.
Single column steps:
- Select the range in one column, such as A2:A100
- Go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values
- Choose a format like red fill
- Click OK
Excel automatically highlights all duplicate values without requiring formulas.
Multiple column steps:
- Select the full range across columns, such as A2:C100
- Follow Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values
- Apply your preferred formatting
- Click OK
Excel highlights each cell value that appears more than once anywhere within the selected range. This method identifies duplicate cell values individually rather than flagging complete duplicate rows.
Custom formula for duplicate rows:
To highlight entire rows where all column values match another row exactly, use a formula-based conditional formatting rule. Select the range and choose Home > Conditional Formatting > New Rule > Use a formula. Enter the appropriate formula, then set the format.
For single columns:
=COUNTIF($A$2:$A$100,A2)>1
For matching duplicate rows across multiple columns:
=COUNTIFS($A$2:$A$100,$A2,$B$2:$B$100,$B2)>1
This COUNTIFS approach evaluates whether the combination of values across specified columns appears more than once, enabling true duplicate row detection.
How to find duplicates using the COUNTIF function
The COUNTIF function identifies duplicates by counting occurrences of each value in a helper column. Values greater than 1 indicate duplicates.
Helper column setup:
- Insert a new column next to your data (Column B for data in Column A)
- In the first data row (B2), enter the formula below
- Press Enter
- Drag the fill handle down to copy the formula across all rows
- Apply filters or conditional formatting on the helper column to review duplicates
=COUNTIF($A$2:$A$100,A2)
The formula uses an absolute range reference (A$2: A$100) and a relative cell reference (A2) to count how many times each value appears.
How to find duplicates across multiple columns using COUNTIFS
COUNTIFS counts matches across multiple criteria pairs, extending COUNTIF's logic to combined column evaluations.
Setup process:
- Insert a helper column (Column D for data in Columns A and B)
- Enter the COUNTIFS formula in the first data row (D2)
- Copy the formula down through all rows
- Results over 1 flag rows with duplicate combinations
=COUNTIFS($A$2:$A$100,$A2,$B$2:$B$100,$B2)
Add more criteria pairs for additional columns:
=COUNTIFS($A$2:$A$100,$A2,$B$2:$B$100,$B2,$C$2:$C$100,$C2)
How to remove duplicates in Excel
The Remove Duplicates feature eliminates duplicate rows permanently while keeping the first occurrence of each value.
Steps:
- Select your data range or table
- Navigate to Data tab > Data Tools group > Remove Duplicates
- Check "My data has headers" when applicable
- Select columns to evaluate for duplicates (or all columns for full row comparison)
- Click OK
Excel displays a summary showing the count of removed duplicates and remaining unique rows.
Precautions before using Remove Duplicates:
- Work on a copy of your data first, as changes are irreversible without immediate Undo (Ctrl+Z)
- Verify headers are correctly identified to avoid treating them as data
- Test on a subset for large datasets, since the feature may alter formulas or relationships unexpectedly
How to use the UNIQUE function to find duplicates
The UNIQUE function in Excel 365 and Excel 2021 extracts unique values dynamically without altering original data.
Steps:
- Click an empty cell for output
- Enter the UNIQUE formula
- Press Enter to spill results automatically
- Copy or reference the spilled range for further analysis
For a single column:
=UNIQUE(A2:A1000)
For unique row combinations across columns:
=UNIQUE(A2:C1000)
For values appearing exactly once:
=UNIQUE(A2:A1000,,TRUE)
The function updates dynamically when source data changes, making it suitable for large datasets requiring ongoing analysis.
How to find duplicates using Power Query
Power Query handles millions of rows with case-sensitive duplicate detection options and refreshable queries.
Steps:
- Select your data
- Go to Data > From Table/Range to launch Power Query Editor
- Choose columns or the entire table
- Navigate to Home > Remove Rows > Remove Duplicates
- Preview unique results
- Click Close & Load to export results to a new sheet
Refresh the query when source data changes to update the duplicate analysis automatically.
Which method works best for different situations
| Method | Best Use Case |
|---|---|
| Conditional Formatting | Quick visual identification of duplicate cell values without data changes |
| COUNTIF/COUNTIFS | Precise counting with filtering capability and true duplicate row detection |
| Remove Duplicates | Final cleanup when permanent deletion is acceptable |
| UNIQUE Function | Dynamic extraction in Excel 365/2021 |
| Power Query | Large datasets exceeding 100,000 rows |
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
What is the formula to highlight duplicate values
Answers · 1
What is the formula to remove duplicates
Answers · 1
How to delete duplicate values in excel
Answers · 1
How to delete duplicate rows based on one column
Answers · 1