Hello,

I have for example the following set of data:

51
52
53
49
52
51
48
47

I am hoping someone knows a formula that can count the consecutive values above or below 50 depending on the last value in the column.
In this case becuase the last value (ie 47) is below 50, the formula should return 2 (counts 47 and 48).

If the data set was:

51
52
53
49
52
51
52
53

The formula should return 4 (counts 53, 52, 51 and 52).

I have been scouring the internet for a solution with no avail. Hoping someone has a solution for this.
Appreciate your help.