How to Find Repeated Values in Excel
In this article
To find repeated values in Excel, use Conditional Formatting > Highlight Cells Rules > Duplicate Values for a quick visual check, or use the COUNTIF function to flag duplicates in a helper column. For a list of unique entries, use Data > Remove Duplicates or the UNIQUE function in Excel 365. The best method depends on whether you want to highlight, count, or remove duplicates.
What You'll Need
- Microsoft Excel (any modern version; steps may vary slightly by version and platform).
- Your data in a single column or row, or a range where you want to check for duplicates.
- Optional: a helper column if you plan to use formulas.
Step-by-Step
- Select the range where you want to find duplicates. For example, click the column header to select the entire column, or drag to select a specific range like A2:A100. Avoid selecting the header row if it contains labels.
- Open Conditional Formatting: go to the Home tab, click Conditional Formatting, then point to Highlight Cells Rules and click Duplicate Values. (Menu labels can differ slightly by version, device, or region.)
- Choose a format in the dialog box that appears. The default is a light red fill with dark red text, but you can pick another preset or create a custom format. Click OK. Duplicate values in the selected range are now highlighted.
- To count occurrences instead, use a helper column. In the first empty cell next to your data (e.g., B2), enter
=COUNTIF($A$2:$A$100,A2)and press Enter. Replace A2:A100 with your actual range. Drag the fill handle down to apply the formula to the rest of the rows. Any value with a count greater than 1 appears more than once. - To list unique values (Excel 365 and Excel 2021+), use the UNIQUE function. In an empty cell, enter
=UNIQUE(A2:A100)and press Enter. The unique values spill into the cells below. For older versions, use Data > Remove Duplicates on a copy of your data, or use Advanced Filter with "Unique records only" checked. - To remove duplicates, first make a copy of your data (or work on a duplicate sheet) because removal is permanent. Select the range, go to Data > Remove Duplicates, confirm which columns to check, and click OK. Excel reports how many duplicates were removed and how many unique values remain.
- To filter for duplicates, apply a filter (Data > Filter), then use the filter dropdown on your helper column and select values greater than 1. This shows only the rows that contain repeated values.
Common Mistakes
- Selecting the header row: Conditional formatting will treat the header as a value and may highlight it if it matches another cell. Exclude headers from your selection.
- Forgetting absolute references: In COUNTIF, the range must be absolute (with $ signs) so it doesn't shift when you drag the formula down.
- Assuming Remove Duplicates is reversible: It permanently deletes rows. Always work on a copy or use Undo immediately if you make a mistake.
- Ignoring case sensitivity: Excel's duplicate tools are not case-sensitive by default. "Apple" and "apple" are treated as duplicates. If case matters, use a formula like
=SUMPRODUCT(--EXACT($A$2:$A$100,A2))to count exact matches. - Overlooking extra spaces: Values with leading or trailing spaces may not be recognized as duplicates. Use TRIM to clean data first, or use a formula that trims.
Tips
- Use a helper column with COUNTIF to not only find duplicates but also see how many times each value appears.
- Combine conditional formatting with a filter to quickly isolate duplicate rows.
- For large datasets, the UNIQUE function is faster and more reliable than manual methods.
- If you need to find duplicates across multiple columns, use COUNTIFS with multiple criteria.
- Remember that conditional formatting highlighting is dynamic: if you change a value, the highlighting updates automatically.
Troubleshooting
- Duplicates not highlighting: Check that you selected the correct range and that the values are truly identical (watch for extra spaces or different data types). Also ensure conditional formatting rules are not being overridden by other rules.
- COUNTIF returns unexpected results: Verify the range references are correct and that the criteria cell is relative. If you see #VALUE! errors, check for text in numeric ranges.
- Remove Duplicates removes too much: You may have selected multiple columns and Excel is comparing entire rows. To remove duplicates based on a single column, select only that column before running Remove Duplicates, or uncheck other columns in the dialog.
- UNIQUE function not available: It requires Excel 365 or Excel 2021. For older versions, use Advanced Filter or a combination of INDEX and MATCH.
- Performance slow with large ranges: Conditional formatting and array formulas can slow down Excel. Limit the range to the actual data area, or use Remove Duplicates on a copy for a one-time clean-up.
Frequently Asked Questions
How do I find duplicates in Excel without highlighting?
Use a helper column with the COUNTIF formula as described in step 4. Filter the helper column for values greater than 1 to see only the duplicate rows.
Can I find duplicates across multiple columns?
Yes. Use COUNTIFS with multiple criteria, or concatenate the columns into a helper column and then use COUNTIF on that concatenated value.
Does Remove Duplicates work on multiple sheets at once?
No, Remove Duplicates works on a single range or table at a time. You need to run it separately for each sheet.
How do I find duplicates case-sensitively?
Use a formula like =SUMPRODUCT(--EXACT($A$2:$A$100,A2)) to count exact matches, or use conditional formatting with a formula rule that uses EXACT.
What is the difference between duplicate and unique values?
Duplicate values appear more than once in your data; unique values appear only once. Excel's tools can highlight either duplicates or uniques depending on the option you choose.