Hello all,

I have a column with daily price data of stock price changes. These are positive or negative. The magnitude doesn't matter, so it can be formatted to binary data (0 or 1).

I'd like to count the number of consecutive positive days in a row. For example:

2 positive days in a row = 300

3 positive days in a row = 200

4 positive days in a row = 100

...

10 positive days in a row = 2 (happened only two times)

As an example (figures are random).

Then, I'd like to do the same for negative days in a row.

I'll attach a sample sheet of what the result table could look like, but I'm at a loss with regards to how to calculate it. I imagine the Frequency function might be suitable?

Thanks in advance!

Elijah

## Bookmarks