Forum Discussion
cubd8
Mar 01, 2021Copper Contributor
Counting the number of occurrences
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
| Group | Common | |
| ABC | Hello | 3 |
| ABC | Hello | 3 |
| ABC | Hello | 3 |
| EFG | Bye Bye | 1 |
| Ola | 1 | |
| CCC | EEE | 1 |
| DDD | FFF | 2 |
| DDD | FFF | 2 |
2 Replies
- SergeiBaklanDiamond Contributor
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.