Counting the number of occurrences

Copper Contributor

See below for examples:

- How would I write a formula to count the number of occurrences where the Group and Common fields have the same value?

- If Group is blank, output the number of occurrences using only using Common field only

 

GroupCommon 
ABCHello3
ABCHello3
ABCHello3
EFGBye Bye1
 Ola1
CCCEEE1
DDDFFF2
DDDFFF2
   

 

2 Replies

@cubd8 

In C2:

=IF(A2="",COUNTIF($B$2:$B$9,B2),COUNTIFS($A$2:$A$9,A2,$B$2:$B$9,B2))

Adjust the ranges as needed, then fill down.

@cubd8 

Not exactly what is required, just in case

image.png