How to Count Duplicates in a Column in Excel (All Methods)
Counting duplicates in Excel is a crucial task when analyzing data, managing large datasets, or spotting repetitive entries. Whether you’re working on sales reports, attendance sheets, or large-scale inventory lists, identifying and counting duplicates helps maintain data accuracy and improve efficiency.
In this guide, we’ll explore all the methods to count duplicates in a column in Excel, step-by-step. From beginner-friendly techniques to more advanced solutions, you’ll learn how to clean, analyze, and organize your data effectively.

Find Duplicates in a Column in Excel
Whether you’re a data analyst, business professional, or student, mastering these methods will save you time and improve your Excel skills.
Using the COUNTIF Function
The COUNTIF function in Excel is a powerful tool for counting duplicates in a dataset. This function allows you to count how many times a specific value appears in a column or range of cells. Here’s a step-by-step guide to using COUNTIF to count duplicates in Excel.
Step 1: Open MS Excel and Prepare Your Data
Ensure your data is organized in a single column without empty rows or irrelevant data that might interfere with the count.

Prepare your Data
Step 2: Select a Column to Reflect Results
Select a column next to your data to display the counts. Here we have selected Column B to reflect Results.
Step 3: Use COUNTIF to Count Duplicates
Select the cell where you want the duplicate count to appear and Enter the COUNTIF formula. Here we have Selected Cell B1.
=COUNTIF(A:A, A2)
This counts how many times the value in A2 appears in column A.

Enter the COUNTIF Formula
Step 4: Drag the Formula Down and Preview Results
Apply the formula to all rows in your helper column and Preview Results. All the Values greater than 1 indicates Duplicates Values.

Drag the Formula and Preview Results
Tips:
Use conditional formatting alongside COUNTIF to visually highlight duplicates.
Using Pivot Tables
Pivot Tables are one of the most powerful tools in Excel for summarizing data, including identifying and counting duplicates. They enable users to analyze large datasets efficiently by organizing and aggregating data into a concise, understandable format. Follow the below steps by step process to Count Duplicates in Excel uisng Pivot Tables:
Step 1: Prepare Your Dataset
Before creating a Pivot Table, ensure your dataset is clean.

Prepare your Data
Step 2: Select the Data, Go to Insert Tab and Select Pivot Table
Highlight the column containing the data you want to analyze for duplicates. If your dataset contains multiple columns, select the entire dataset to maintain context. Go to Insert Tab and Select Pivot Table:

Select the Data>> Go to Insert Icon >>Select Pivot Table
Step 3: Configure the Pivot Table
Once the Pivot Table is inserted, a blank table will appear along with the Pivot Table Fields pane.
Drag the Column into Rows
- Drag the column containing duplicate-prone data (e.g., “Data”) into the Rows area.
- This will create a list of unique values from that column.
Drag the Same Column into Values
- Drag the same column into the Values area.
- By default, the Values area aggregates data using “Sum.” Change this to “Count”

Drag the Column to Rows and Values Filed
Step 4: Preview the Results
The Pivot Table will now display a list of unique values in the Rows area and their respective counts in the Values area. Any value with a count greater than 1 indicates duplicates.

Preview the Results
Using Conditional Formatting
Conditional formatting is an intuitive and efficient method for identifying duplicate values in Excel. By visually highlighting duplicates, you can quickly spot and analyze repetitive entries in your data without making any changes to the actual values. Follow the below steps to Highlight Duplicates in Excel using conditional Formatting:
Step 1: Highlight the Column
Select the range of data in the column.
Step 2: Apply Conditional Formatting
Access the Conditional Formatting Menu:
- Go to the Home tab in the Excel ribbon.
- Click on Conditional Formatting, which is located in the Styles group.
Choose Highlight Cell Rules:
- From the Conditional Formatting dropdown, navigate to Highlight Cell Rules > Duplicate Values.

Go to Home Tab>>Select Conditional formatting>>Highlight Cell Rules >> Duplicate Values
Step 3: Choose a Formatting Style
Once you select Duplicate Values, a dialog box will appear allowing you to choose how the duplicates should be formatted.

Choose a Formatting Style
Step 4: Review the Highlighted Results
After applying the rule, Excel automatically highlights duplicate values in the selected range.

Preview the Highlighted Results
Best For:
Quickly spotting duplicate values without altering the data.
Using Advanced Filters
Advanced Filters in Excel are a powerful yet underutilized tool for managing duplicates. They allow you to isolate unique or duplicate records and extract them to a different location for further analysis. This method is particularly useful when you need to preserve your original dataset while focusing on the duplicate entries.
Step 1: Prepare your Data Set
Open MS Excel and Enter Data into the Sheet. Make Sure your Data should be Clean and Should contain Headers.
Step 2: Go to the “Data” Tab and Select “Advanced” Option
Navigate to the Data tab on the Excel ribbon and Click on Advanced option in the Sort & Filter group.

Go to Data Tab>>Click on Advanced Option
Step 3: Configure the Advanced Filter
Once you click Advanced, a dialog box will appear with the following options:
Choose the Action
- Filter the List, In-Place:
- Use this option if you want to display the filtered results directly within your current dataset.
- Copy to Another Location:
- Choose this option to extract the filtered data to a separate location (preferred for duplicates extraction).
Specify the List Range
- In the List Range field, highlight the column or dataset you want to filter for duplicates.
- Ensure you include headers in the selection.
Set Criteria and Click OK
Check the box labeled Unique Records Only. This will ensure only unique values are extracted or displayed.

Select the Appropriate Options
Step 4: Analyze Output
Excel will extract the unique records to the specified location.

Preview Results
Additional Tips & Tricks
- Combine Methods: Use COUNTIF with conditional formatting for both numeric and textual duplicates.
- Clean Data First: Remove extra spaces with the TRIM function before analysis.
- Dynamic Ranges: Use named ranges or structured references for dynamic datasets.
- Prevent Duplicates: Use Data Validation to restrict duplicate entries.
Conclusion
Counting duplicates in Excel doesn’t have to be complicated. Whether you use the quick COUNTIF function, the organized summaries of Pivot Tables, the visual cues of Conditional Formatting, or the filtering power of Advanced Filters, Excel has you covered. These methods make it easy to spot and manage duplicates, helping you keep your data clean and organized. With a little practice, you’ll be able to handle duplicates like a pro and focus on what really matters in your work.
How to Count Duplicates in Excel – FAQs
Is there a way to count duplicates in Excel?
Yes, there are a couple of ways to count duplicates in Excel. Here’s the simplest way:
- Let’s say your data is in column A.
- In an empty cell (let’s say B2), type this formula: =COUNTIF(A:A,A2)
- This formula counts how many times the value in cell A2 appears in the entire column A (including A2 itself).
- Drag the formula down from cell B2 to all the cells where you want to count duplicates for other values.
How do you count duplicates in a list?
There are two main ways to count duplicates in a list, depending on what you want to know:
- Are there any duplicates – The simplest way is to convert the list to a set. Sets can’t have duplicates, so if the length of the list is different from the length of the set, there are duplicates.
- How many times does each element appear – You can use a dictionary to keep track of how many times you’ve seen each element. Loop through the list, and for each element, check if it’s already in the dictionary. If it is, increment the count for that element. If not, add it to the dictionary with a count of 1.
What is the formula for duplicates in Excel?
The most common formula to count duplicates in Excel is =COUNTIF(range,criteria).
Here’s what each part means:
- =COUNTIF( starts the formula to count how many times a certain criteria is met.
- range is the area you want to check for duplicates, like A1:A10 for cells A1 to A10.
- criteria is the value you want to count appearances of. This can be a cell reference (like B2) or the value itself (like “Apple”).
What is the formula to count duplicates in sheets?
Sheets uses the same formula as Excel to count duplicates: =COUNTIF(range, criteria).