Skip to main content

How to count duplicate values in a column in Excel?

If you have a list of data in a worksheet with unique values and duplicate values, and you do not only want to count the frequency of duplicate values also want to know the order of the occurrence of the duplicate values. In Excel, the COUNTIF function can help you count the duplicate values.


Count the frequency of duplicates in Excel

In Excel, you can use COUNTIF function to count the duplicates.

Select a blank cell adjacent to the first data of your list, and type this formula =COUNTIF($A$2:$A$9, A2) (the range $A$2:$A$9 indicates the list of data, and A2 stands the cell you want to count the frequency, you can change them as you need), then press Enter, and drag the fill handle to fill the column you need. See screenshot:

Tip: If you want to count the duplicates in the whole Column, use this formula =COUNTIF(A:A, A2) (the Column A indicates column of data, and A2 stands the cell you want to count the frequency, you can change them as you need).

Quickly select and count all duplicate/unique values from a column in Excel

In general, we can remove duplicates from a list easily by Data > Remove Duplicates in Excel. But how to select duplicate/unique values, or count them from a column? And what if selecting or counting duplicate/unique except the first duplicate one? Try Kutools for Excel’s Select Duplicate & Unique Cells utility!


ad select count duplicates

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now

Count the order of occurrence of duplicates in Excel

But if you want to count the order of the occurrence of the duplicates, you can use the following formula.

Select a blank cell adjacent to the first data of your list, and type this formula =COUNTIF($A$2:$A2,A2) (the range $A$2:$A2 indicates the list of data, and A2 stands the cell you want to count the order, you can change them as you need), then press Enter, and drag the fill handle to fill the column you need. See screenshot:


Count and select all duplicates in a column with Kutools for Excel

Sometimes you may want to count and select all duplicates in a specified column. You can get it done easily with Kutools for Excel’s Select Duplicates & Unique Cells utility.

Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy a full-featured 30-day FREE trial with no credit card required! Download now!

1. Select the column or list that you will count all duplicates, and click the Kutools > Select > Select Duplicates & Unique Cells.

2. In the opening Select Duplicate & Unique Cells dialog box, check the Duplicates (Except 1st one) option or All duplicates (Including 1st one) option as you need, and click the Ok button.

And then you will see a dialog box comes out and shows how many duplicates are selected, and at the same time duplicates are selected in the specified column.

Note: If you want to count all duplicates including the first one, you need to check the All duplicates (Including 1st one) option in the Select Duplicate & Unique Cells dialog box.

3. Click the OK button.

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now


Count occurrences of each duplicate in a column with Kutools for Excel

Kutools for Excel’s Advanced Combine Rows utility can help Excel users to batch count the occurrences of each items in a column (the Fruited Column in our case), and then delete the duplicate rows based on this column (the Fruit Column) easily as below:

Kutools for Excel - Packed with over 300 essential tools for Excel. Enjoy a full-featured 30-day FREE trial with no credit card required! Download now!

1. Select the table containing the column where you will count each duplicate, and click Kutools > Content > Advanced Combine Rows.

2. In the Advanced Combine Rows, select the column you will count each duplicate and click Primary Key, next select the column you will put counting results in and click Calculate > Count, and then click the OK button. See screenshot:

And now it has counted the occurrence of each duplicate in the specified column. See screenshot:

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now


Demo: count duplicate values in a column in Excel by Kutools for Excel


Kutools for Excel: Over 300 handy tools at your fingertips! Start your 30-day free trial with no feature limitations today. Download Now!

Relative Articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (58)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Tolong di Bantu, Jika misalkan di Kolom A Misalkan No Part yang sama ada 3 Part, lalu di kolom b ada tiga progress, Bagaimana menegtahui bahwa jika di kolom sudah complete semua maka di kolom c complete, tetapi jika ada salah satu belum complete maka di kolom C On Progress, Sebagai catatan untuk di kolom A variatif , ada yang jumlahnya 3, 4, 2, etc.. Mohon di bantu caranya untuk di excel.

A B C
Part 1 Progress On Progress
Part 1 Complete On Progress
Part 1 Complete On Progress
This comment was minimized by the moderator on the site
Halo, bagaimana jika kita ingin menjumlahkan total dari data duplikat tersebut? Contoh, Banyaknya Apel pada baris satu adalah 734pcs, Apel pada baris 5 100pcs, Apel pada baris 8 20pcs. Bagaimana cara menjumlahkannya dengan otomatis? Terima Kasih untuk jawabannya
This comment was minimized by the moderator on the site
Hi Lia,
You can wrap multiple COUNTIF expressions into one SUM formula, in which the COUNTIF expressions shoule be seperated by comma. Here is an example: =SUM(COUNTIF($B$2:$B$8, B2),COUNTIF($B$2:$B$8, B3),COUNTIF($B$2:$B$8, B4)).The cells B2, B3, B4 stand for the value that you want to count its frequency.
Hope this helps you.
Amanda
This comment was minimized by the moderator on the site
Hi, I'm trying to calculate the duplicate values as a single value in excel. But I can't. Can you help me?. For example, I have entered in rows as 1001,1002,1003,1004 and again 1001,1002,1003,1004" like this. In this case, all are duplicate ones. but it should bring "1001" as a single count, not two counts. Is there any formula for it?
This comment was minimized by the moderator on the site
Hi Manikandan.K,
Supposing the data you will count are placed in the Range A1:A20, you can use below arrow formula to count (a set of duplicates only count once):
=SUM(IF(A1:A20<>"",1/COUNTIF(A1:A20,A1:A20)))
Please note that it’s an array formula, please press Ctrl + Shift + Enter keys to get the counting result.
This comment was minimized by the moderator on the site
Hi can you please let me know in this how to calculate data in multiple conditions include wiht this condition,  if I also chosen columns in location wise and status wise Thank you 
This comment was minimized by the moderator on the site
Hi I'm trying to run the "Advanced Combined Row" feature, but when I run it excel crashes every time.
This comment was minimized by the moderator on the site
I have entered in a row as " 10,10,10,10,10,10,10,8,11,10,10,10,10,10" like this, now I entered 14 number values. How I can count the different number in single row? the result should be "14" in my case.
This comment was minimized by the moderator on the site
Hi Sampath Rangan,
Do you need to count all numbers in the row, or count the duplicates in the row?
Supposing the numbers are in the Range A1:N1, now you can count the numbers as follows:
Count all numbers: =COUNT(A1:N1)
Count duplicates, says 10: =COUNTIF($A$1:$N$1,"10")
This comment was minimized by the moderator on the site
Thanks so much, saved me hours!
This comment was minimized by the moderator on the site
i need this
There are 24 students.how many groups are there to take 10 student in 1 group
example:
1,2,3,4,5 take 1 group in 3 number

ans={1,2,3} {2,3,4} {3,4,5} {4,5,1} {5,1,2,}

how to do this excel will create this file
This comment was minimized by the moderator on the site
Hi patel akshay,
You can use the COMBIN function in Excel directly.
=COMBIN(24,10)
This comment was minimized by the moderator on the site
Thank You very much. It's very useful.
This comment was minimized by the moderator on the site
I must be stupid as the KuTools solution is not working for me. I have copied the example with Fruits column (which I put 3 Apple entries in), made a column next to it which is blank called Count column. KuTools -> Content -> Advanced Combine Rows. Select Fruit column as primary key, Count column as Calculate -> Count. Hit OK. Nothing. No change to the sheet. Help please?
This comment was minimized by the moderator on the site
Hi BillBrewster,
Would you do me a favor and send me a screenshot about the Advanced Combine Rows dialog? Just like the screenshot as below. Thanks in advance!
This comment was minimized by the moderator on the site
Dear, I am working on the attached Screenshot and Excel File. I need to calculate the Values in Column "G" i.e. to Count unique text values based on multiple (Two) criteria, but criteria are in NUMBERS. Further, Its is big sheet, therefore I want to use the cell reference in range and in criteria. I am very confused. I want to count the column C i.e. Degree based on the Criteria E and F. That is,I need to set formula in G2, such that, Look E2 in column A and Look F2 in column B and count the unique text values in Column C. Hope it is clear.

I am very thankful to you please


Details:
I have a data of more than 1000 companies with different year. As in column A, I have companies and B shows the year for which these companies have data. For example, First company have data for year 2011, 2012, 2013 and 2015. For company 2, I have data for year 2014 and 2011 and so on. Since majority of companies have data from 2011 to 2015, therefore I select this range in column F for each company. Now, I want to count the unique Degrees for cell G2, if there is 389841988 (Company ID for First company) in A and there is 2011 in Column B. Now I need to set formula in G2,in a way, If I will drag the formula G2 in cell G3, then It should give me the value by looking such as if there is 389841988 (Company ID for First company) in A and there is 2012 in Column B, the based on these two criteria, it should count the unique text in C2 and so on.
Look on the second sheet named Example, I did the same for INDEX, MATCH function and as well for SUMIFS function; in C2 I have the array formula INDEX($F:$H,MATCH(1,(A2=$F:$F)*(B2=$G:$G),0),3) and in D2 I have SUMIFS(I:I,F:F,A2,G:G,B2). These help me to do what I want with two criteria (To match and also to sum) and also I can drag these for rest of cell. I am looking something like this, or anything that I can drag to count unique degrees. Thank you very much. I am waiting.

Plz help. I am very thankful to for this kindness
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations