Excel: Counting duplicates

Excel: Counting duplicates

There's not a button to count duplicates, but there's other ways to do it in Excel

Once in a while, one needs to count how many duplicates one have and there's way's to do this in Excel

[snippet]=COUNTIF($B$2:$B$34602,A3)[/snippet]

Above COUNTIF snippet, starts by defining what column (B in this case) and row (2 in this case), it starts on. Then it defines until where it will stop looking. Then A3 defines what value is should look for

ABC
1Birthday
220102010=COUNTIF($A$2:$A$20,B2)
32001
42010
5...

Here we have told it to start looking on A2 and look until A20, for all that matches 2010

Subtract first occurrence


In some occurances, you only want to list how many duplicates there are and not include the first occurrence

[snippet]=COUNTIF($B$2:$B$34602,A3)-1[/snippet]

By adding -1 at the end, one will be subtracted from the total and you'll know how many duplicates you have



Tags: #Excel

We sometimes publish affiliate links and these always needs to follow our editorial policy, for more information check out our affiliate link policy

You might also like

Comments

Sign up or Login to post a comment

There are no comments, be the first to comment.