Hello
I have a column ‘A’ where the calculated value of each cell is either a 1 or 0. I am looking for a formula to enter into the adjacent column ‘B’ that returns a 1 in relation to groups of 1s.

Although presented in a line here it is for example:

Column A 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0

And I need it to return

Column B 1 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0

I want to return a 1 value for every time a ‘group’ of 1s occurs so in the above example the number of groups (column B) is 6.

Basically I want to count the number of separate groups of 1’s in a column. A group could have one 1 in it or several 1s in it.