Forum Discussion
Brian_Ager
Aug 18, 2023Copper Contributor
Countif when the criteria is a certain number in a row
I am looking for a count function that counts the number of occurrences happens but must meet a 3 in a row criteria.
Example: For column BG count only if a value > 12 occurs 3 or more times in a row, For the example, there are 16 occurrences > 12, but only BG3755:BG3760 and BG3764:BG3767 would be counted. Thus a count of 2 instead of 12. Thanks for any help.
1 Reply
- OliverScheurichGold Contributor
=IF(BG3755>12,BH3754+1,0)I'd apply this helper formula in cell BH3755 and fill down as required.
=COUNTIF(BH3755:BH3768,3)COUNTIF returns the intended result.