Counting Consecutive Cells

MrT_FortyFour

New Member
Joined
Jan 28, 2020
Messages
2
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Good Afternoon All,

I have a large excel data sheet and one of the calculated cells indicates if a tank level is less than 85% and if it is, returns a "1" value. We have a process safety issue if that tank remains less than 85% for more than 1 hour. I'm trying to calculate how many times the trigger is >=10 consecutively. I've been able to indicate that I've had months where this has happened by using the following formula [=IF(OR(COUNTIFS($A$3:$A$93868,"=7",$B$3:$B$93868,"=2019",$W$3:$W$93868,"=1")>=10),"T","F")]. What I would like to do is return a number throughout the range (W3:W93868) of how many times we've had 10 or more consecutive events.

I'm not sure if I'm explaining it properly but I uploaded a screenshot of the excel sheet to show the column I'm trying to count.

Thanks for any help.

Bruce
 

Attachments

  • 16-33-17.png
    16-33-17.png
    154.3 KB · Views: 12

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to Mr Excel forum

See if this example with a small data sample helps - count how many times in A2:A30 there are 5 (value in C2) or more consecutives 1

Book1
ABCD
1NumbersConsecutivesResult
2153
31
40
51
61
71
81
91
101
110
121
131
141
151
161
170
180
191
201
211
221
230
241
251
261
271
281
291
300
Plan2
Cell Formulas
RangeFormula
D2D2{=SUM(--(FREQUENCY(IF(A2:A30=1,ROW(A2:A30)),IF(A2:A30<>1,ROW(A2:A30)))>=C2))}
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.


Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

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