Cumulative Count Check

Steveym

New Member
Joined
Jun 6, 2023
Messages
9
Office Version
  1. 365
Hello, please see attached example sheet.

I have a data listing as per column A 'Point' and a classification column as per column B.

I would like an output as shown in column C 'final classification' which I have pre-populated. The output should pick a cumulative count from column B if it meets the criteria shown in cell F2.

In laymans terms there are five consecutive 'OK' values based on the number input to column F2 therefore the final classification in column C is 'OK'.

Many thanks,

Steven
 

Attachments

  • Example.JPG
    Example.JPG
    108.3 KB · Views: 14

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I'm hoping you have some kind of mistake in your example from rows 5 to 14, because otherwise I can't understand it at all.

MrExcelPlayground19.xlsx
ABCDEF
1PointClassificationFinal Classification
21OKNot OKCumulative criteria5
32Not OKNot OK
43OKNot OK
54OKNot OK
65Not OKNot OK
76Not OKNot OK
87Not OKNot OK
98Not OKNot OK
109Not OKNot OK
1110OKOK
1211OKOK
1312OKOK
1413OKOK
1514OKOK
1615Not OKNot OK
1716Not OKNot OK
1817OKNot OK
1918OKNot OK
2019Not OKNot OK
2120Not OKNot OK
2221Not OKNot OK
2322Not OKNot OK
2423Not OKNot OK
2524Not OKNot OK
2625Not OKNot OK
2726OKOK
2827OKOK
2928OKOK
3029OKOK
3130OKOK
3231Not OKNot OK
3332Not OKNot OK
3433Not OKNot OK
3534OKNot OK
3635OKNot OK
3736OKNot OK
3837OKNot OK
3938Not OKNot OK
4039Not OKNot OK
4140OKOK
4241OKOK
4342OKOK
4443OKOK
4544OKOK
4645Not OKNot OK
4746Not OKNot OK
4847OKNot OK
4948OKNot OK
5049OKNot OK
5150OKNot OK
Sheet10
Cell Formulas
RangeFormula
C2:C51C2=LET(z,$F$2,a,$B$2:$B$51,b,A2,c,MAX($A$2,A2-z+1),d,MIN($A$51,A2+z-1),e,INDEX(a,SEQUENCE(d-c+1,1,c))="OK",f,MAX(FREQUENCY(IF(e,SEQUENCE(ROWS(e))),IF(NOT(e),SEQUENCE(ROWS(e))))),g,f>=z,IF(g,"OK","Not OK"))
 
Upvote 0
My bad, example should be as attached.
 

Attachments

  • Example.JPG
    Example.JPG
    108.7 KB · Views: 4
Upvote 0
Okay, my formula up there should work then.
I am having a bit of an issue with the formula when I have added it to my dataset and changed a few of the values to my working criteria.
Can you see any stand-out issue with the attached?
 

Attachments

  • Example.JPG
    Example.JPG
    157.1 KB · Views: 4
Upvote 0
C1 has to be an integer for this thing to work - it's the number of consecutive things to look for (5 in the original example). The whole thing was setup for column A to be sequential integers.
 
Upvote 0

Forum statistics

Threads
1,215,077
Messages
6,122,991
Members
449,094
Latest member
masterms

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