• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Increment with resets in between

kirkmaciano

New Member
Hello everyone


I have a problem here. Is it possible to achieve the below where for every false, the count increments by 1 and when a true appears, the count resets. True and false are not typed values, they are generated by the if function.


Col A | Col B

True | True

False | 1

False | 2

False | 3

True | True

True | True

False | 1

False | 2


I know the rows() function is definitely required but I'm totally clueless on how to get it reset.


Any experts able to help out?


Thanks
 
Kirkmaciano


Firstly, Welcome to the Chandoo.org forums


I assume your data is in A2 down

in B2 put:

Code:
=IF(A2=FALSE,IF(A1=TRUE,1,B1+1),A2)

Copy down
 
Back
Top