View Single Post
  #2   Report Post  
Domenic
 
Posts: n/a
Default

Try the following...

B1, copied down:

=SUM(--(COUNTIF(OFFSET($A$1:$A$10,ROW($A$1:$A$10)-MIN(ROW($A$1:$A$10)),0,
ROWS($B$1:B1)+1),"O")=ROWS($B$1:B1)+1))

....confirmed with CONTROL+SHIFT+ENTER, not just ENTER. Note that the
result displayed in B1 will tell you how many times 'O' appeared in 2
consecutive cells, B2 will tell you how many times 'O' appeared in 3
consecutive cells, and so on.

Hope this helps!

In article ,
"Trapper via OfficeKB.com" wrote:

I have a simple need: I have one column of data containing either an O or
a U. Is there a way I can ask EXCEL to tell me how many times the O
appeared in 2 consecutive cells, 3 consecutive cells... etc. Say I am
using collumn A for this
A
1 O
2 O
3 O
4 U
5 U
6 O
7 U
8 U
9 U
10 U