Another Excel question - count patterns?

Soldato
Joined
7 May 2004
Posts
5,503
Location
Naked and afraid
Ok I wanted to know if I could get Excel to count an exact pattern, the data is in two separate columns as per the below.

2z4hla9.jpg


I'd like to count the number of times a day is followed by the same day and the result is win followed by loss in the opposing column. As highlighted above.

So in the above example there would be 3.
 
third column formula =IF((A2=A1),IF((B1="W"),IF(B2="L",1,0),0),0)
Replace A2,A1,B1,B2 with the relevant cells, replicate the formula down the list
then sum up the third column

Crude, but it works
 
Back
Top Bottom