Count duplicate values in a column in Excel
The needful can be achieved using the COUNTIF function. You could either count the frequency of the duplicates in Excel or the order of occurrence of the duplicates in Excel.
Count the frequency of duplicate values across a column in Excel
Let us suppose a situation in which we need the number of instances where a certain value repeats in a selected list across a column. If all you need to know is the frequency of repetition of each value, the formula would be: Where,
Eg. If we have a list of entries across column B from B3 to B11, and we need the number of duplicates for each value in column C, from cell C3 to cell C11. The formula would become:
This formula needs to be inserted in cell C3. Now click anywhere outside cell C3 and then back on it. This would activate the Fill function. Notice a small dot at the right-bottom corner of the selected cell. Click on it and pull the selection (and simultaneously the formula) down to cell C11.
Calculate the order of occurrence of duplicates across a column in Excel
Just as in the above example, if you need the count of the duplicate entry to increase as and when the entry reoccurs, try the following formula: Where,
Eg. Picking up the previous example, the set of entries is from cell B3 to cell B11 and we need to count of occurrences in column C, the formula would become:
Enter this formula in cell C3 and pull the formula down to cell C11 using the Fill function. Unlike in the previous case, you will notice that the first occurrence of an entry is marked 1, the second 2, and so on. Read next: How to Merge and Unmerge cells in Excel. Hope it helps!