I was wondering if it's possible to count how many times does "x" number apear consecutively untill first "y" consecutive apear. Example:

- 1 1=2
- 2 2=1
- 1 3=0
- 1 4=1
- 1 5=1
- 1
- 2 "x" would be number 1 in colum
- 2 "y" would be 5 times consecutive
- 1
- 1
- 2
- 1
- 2
- 1
- 1
- 1
- 1
- 1

Another example: let's say you have RANDBETWEEN(1,2) set in a colum from A1 to A1001. Now I'm wondering if exel could count how many times does number 1 apear standing alone between two 2's, how many times does number 1 apear two times consecutively, three times consecutively, four times consecutively and so on untill lets say it counts the first seven time consecutive, then it stops counting. If you check the uper example, number 1 apeared two times standing alone, two times it apeared two times consecutively, zero times it apeared three times consecutively, one time it apeared four times consecutively and one time it apeared five times consecutively