Counting consecutive cells

N

neil

Hi,

I have a table with 60 columns, each column marked A, B or X. I need to know
how many times X's appear consecutively. How do I do this?

Thanks in advance

Neil
 
F

Frank Kabel

Hi
and what should happen if you have more than one series of 'X'? Maybe give
an example + your expected result
 
N

neil

Hi Frank,

Yes, that is what I want.
(COLUMNS) A B C D E F G H I J K
A X B X X A X B X X
in this sequence, you have two consecutive "x". what i need to know is how
many times the two consecutive "x" series occurs.

Thank you

Neil
 
F

Frank Kabel

Hi
you may try:
=SUMPRODUCT(--(A1:X1="X"),--(B1:Y1="X"))

Note: if you have 3 'X' in a series this would be counted as '2'
 
N

neil

Thanks Frank,

Works like a charm! (I make sure that there are no three consecutive "x",
that is my job :)

Can you pls also tell me how this works??

Regards,

Neil
 
Top