Counting consecutive numbers greater than a set value

Bcapcook

New Member
Joined
Mar 23, 2019
Messages
3
I am tracking snow data for skiing. In column D I have the snow that fell in the last 24hrs. I want to count how many consecutive times the value over 10 occurs in the column.
I thought I had it with =MAX(FREQUENCY(IF(D2:D153,">10",ROW(D2:D153)),IF(D2:D153,">10",ROW(D2:D153)))))


A B C D E
1 MonthDayVisSnowTemp
2November2212-2
3 February20513-10
4 February2147-11
5 February2239-12
6 February23542-11
7 February24414-11
8 February25510-14
9 February2650-16

<tbody>
</tbody>
In the above the formula would count D6:D8 giving a value of 3. Thus in column D, 10 14, and 42 are counted because they have a value of 10 and higher consecutively.

Thanks in advance

Byron
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try this.
Code:
=MAX(FREQUENCY(IF(D2:D9>=10,ROW(D2:D9)),IF(D2:D9<10,ROW(D2:D9))))

This is an array formula so hit Ctl+Shift+Enter when entering the formula.
 
Last edited:
Upvote 0
Try this.
Code:
=MAX(FREQUENCY(IF(D2:D9>=10,ROW(D2:D9)),IF(D2:D9<10,ROW(D2:D9))))

This is an array formula so hit Ctl+Shift+Enter when entering the formula.


That was done, just didn't copy and paste with the brackets. Regardless it didn't work
 
Upvote 0
It worked on the data in your original post. The formula I posted doesn't have 10 in quotations, whereas your original post did. Did you try it without the quotes?
 
Upvote 0
Regardless it didn't work
Are you sure that you entered the formula with Ctl+Shift+Enter (and the curly brackets appeared) as the formula lrobbo314 posted works fine for me.
See formula/result in F2


Excel 2010
ABCDEF
11 MonthDayVisSnowTemp
202-Nov2212-23
303-Feb20513-10
404-Feb2147-11
505-Feb2239-12
606-Feb23542-11
707-Feb24414-11
808-Feb25510-14
909-Feb2650-16
Sheet1
Cell Formulas
RangeFormula
F2{=MAX(FREQUENCY(IF(D2:D9>=10,ROW(D2:D9)),IF(D2:D9<10,ROW(D2:D9))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
It worked on the data in your original post. The formula I posted doesn't have 10 in quotations, whereas your original post did. Did you try it without the quotes?

Being new to this I over looked the changes to the formula thought you were just suggesting the array.

Your formula works wonderfully .

Thank You
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,485
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top