Count a value change in cells

Closed
MindTwister Posts 4 Registration date Wednesday February 4, 2015 Status Member Last seen March 7, 2015 - Feb 10, 2015 at 02:13 PM
MindTwister Posts 4 Registration date Wednesday February 4, 2015 Status Member Last seen March 7, 2015 - Feb 16, 2015 at 12:00 PM
Hi, I'm trying to count how many times did 1 cell from a row has been changed from 1 to 0 and then back to 1, how many times did this form of change happened.

For example:

1|0|1|0|0|0|1|0|0|0|0|0|0|0|0|0|1|0|0|0|0

I'm counting the changes between even columns aside from counting in odd columns.
So the count here is 2 from what I'm trying to do.

Here's a file for more understanding:
https://www10.zippyshare.com/v/Ff0ioaqm/file.html

Thanks for the help!

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 555
Feb 16, 2015 at 11:36 AM
Hi MindTwister,

Your query is not clear to me.

When I look at your example, looking at the odd columns I get:
1 1 0 1 0 0 0 0 1 0 0
Here I count 5 changes from 1 to 0 and from 0 to 1.

The even columns are only 0's so the count there would be 0. So I don't understand how you would get a result of 2.

In your file, you are just counting the odd and even columns, which could be done more effectively by using SUMIF, as in:
=SUMIF(A1:AZ2,"A",A2:AZ2)

Best regards,
Trowa
0
MindTwister Posts 4 Registration date Wednesday February 4, 2015 Status Member Last seen March 7, 2015
Feb 16, 2015 at 12:00 PM
Ok, thanks for the help and to clarify here's a pic to explain the count

http://imageshack.com/a/img540/5306/PHYBeB.png
0