I'll do my best to explain what I am having problems with. I have a formula that is showing me how many times either an A or B appears in succession in Row E of my worksheet. so for example:

Col E Col F
A
A
A
B 3
A 1

this works great, however I have come to realize I need to also account for situations where the succession is longer than 2 or 3. Here is an example, and the data situation I am having issues solving:

Col E
A
A
A 2
A 3
A
A

I want to be able to put a formula in that only counts 2 and/or 3 consecutive A's or B's. Is this enough info? Only A and B exist in Col E.