Continuous Value Count Question

macb333

New Member
Joined
Jun 15, 2011
Messages
4
I need to count the number of continuous values within a range. For example, suppose I had a year of temp data (365 values) how would I count the number of continuous days with temps between 70 and 75. if given:
A B
72 68
75 70
73 72
71 71
69 68
70 67
68 71
72 75
69 76

A: I would like the formula to return "4" , i only want to count the value if the previous value is also within the range.
b: I would like the formula to return "5" , and I would like a max continuous formula/value of "3"

I am familiar with the count,countif,countifs commands. I have tried the frequency command, but am unsure of how to arrange the syntax, any help is greatly appreciated.
 
How can I modify/adjust the formula to get the longest streak of consecutive days -- it currently counts all consecutive values and sums them. e.g. I get "75"(as sum of all consecutive days) instead of "20" (longest consecutive period). I may be asking too much, but I need to be able to perform both calculations.
What formula are you using?

I don't see any formulas in this thread that will do a sum. :confused:
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

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