Follow up question to Count number of times value appears consecutively in a row - Excel
I want to count the number of "1"'s that appear more than once consecutively in a row - and if max count for that row is less than 4, then also count 1's with no consecutives.
Below output is correct until single "1" which is not counted.
Countif formula is =AND(E5=1, F5=1) + COUNTIFS(E5:Z5, "", F5:AA5, 1, G5:AB5, 1) which recognizes consecutive "1"s. If row 3 had a single 1 at the beginning, its value would be 3 because counter (bold) is only 2.


[0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1], the total count is 3 which is less than 4, so could you please advise what would be the desired count based on your new requirement? Could you please in your example include a couple different scenarios and the desired output?