I count 2 in your test data.
And I counted 2 using this formula (with your data in A1:A9:
=SUMPRODUCT(--(A1:A8=FALSE),--(A2:A9=TRUE))
Adjust the ranges to match--but you can't use whole columns (except in xl2007).
=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.
Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html
Keith Rathband wrote:
>
> I have a load of values in a spreadsheet which are either true or false.
>
> I need to count how many times it changes from false to true, bearing in
> mind several true values may follow each other - before returning to false.
>
> ie
>
> TRUE
> FALSE
> FALSE
> TRUE
> TRUE
> TRUE
> FALSE
> FALSE
> TRUE
>
> the result would be 3 - ie it changed from FALSE to TRUE 3 times.
>
> Thanks in advance.
--
Dave Peterson