Counting the multiple consecutive occurrences of a fix sumtotal

alan581

New Member
Joined
May 15, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, I need help in creating a excel formula to count the total occurrences of a consecutive count of 10. Let's say if a student has attended school first 10 days then it's his first occurrence. On 11th day, he is absent and again starts from 12th to 22th day. Total occurrences of 10 days, is 2. So that's how I wanna know total occurrences of 10. If this student has attended school for 6 months then how many consecutiveoccurrences of 10 will be there. Need help on this.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
This will count the number of streaks greater than 9 school days in a row. If the kid comes in 25 days, that won't be counted as 2, just 1. You might want 20 days or 30 days to count as 2 or 3 though. I'm not sure.

MrExcelPlayground17.xlsx
ABCD
110 or more streaks:95
2HolidaysSchool DayJohnny?Mary?
3Monday, October 10, 2022Wednesday, September 14, 2022yy
4Thursday, November 24, 2022Thursday, September 15, 2022yy
5Friday, November 25, 2022Friday, September 16, 2022yy
6Monday, December 26, 2022Monday, September 19, 2022yy
7Tuesday, December 27, 2022Tuesday, September 20, 2022y
8Wednesday, December 28, 2022Wednesday, September 21, 2022yy
9Thursday, December 29, 2022Thursday, September 22, 2022yy
10Friday, December 30, 2022Friday, September 23, 2022yy
11Monday, January 2, 2023Monday, September 26, 2022yy
12Monday, January 16, 2023Tuesday, September 27, 2022
13Monday, February 13, 2023Wednesday, September 28, 2022yy
14Monday, February 20, 2023Thursday, September 29, 2022yy
15Tuesday, February 21, 2023Friday, September 30, 2022yy
16Wednesday, February 22, 2023Monday, October 3, 2022yy
17Thursday, February 23, 2023Tuesday, October 4, 2022yy
18Friday, February 24, 2023Wednesday, October 5, 2022yy
19Monday, April 10, 2023Thursday, October 6, 2022y
20Tuesday, April 11, 2023Friday, October 7, 2022yy
21Wednesday, April 12, 2023Tuesday, October 11, 2022yy
22Thursday, April 13, 2023Wednesday, October 12, 2022yy
23Friday, April 14, 2023Thursday, October 13, 2022y
24Monday, May 29, 2023Friday, October 14, 2022y
25Monday, October 17, 2022yy
26Tuesday, October 18, 2022yy
27Wednesday, October 19, 2022yy
28Thursday, October 20, 2022yy
29Friday, October 21, 2022y
30Monday, October 24, 2022yy
31Tuesday, October 25, 2022yy
32Wednesday, October 26, 2022y
33Thursday, October 27, 2022y
34Friday, October 28, 2022y
35Monday, October 31, 2022yy
36Tuesday, November 1, 2022yy
37Wednesday, November 2, 2022yy
38Thursday, November 3, 2022y
39Friday, November 4, 2022yy
40Monday, November 7, 2022yy
41Tuesday, November 8, 2022yy
42Wednesday, November 9, 2022y
43Thursday, November 10, 2022y
44Friday, November 11, 2022yy
45Monday, November 14, 2022y
46Tuesday, November 15, 2022yy
47Wednesday, November 16, 2022yy
48Thursday, November 17, 2022yy
49Friday, November 18, 2022y
50Monday, November 21, 2022yy
Sheet10
Cell Formulas
RangeFormula
C1:D1C1=ROWS(FILTER(LEN(TEXTSPLIT(SUBSTITUTE(SUBSTITUTE(TEXTJOIN(" ",FALSE,C3:C186)," ","-")," ",""),,"-")),LEN(TEXTSPLIT(SUBSTITUTE(SUBSTITUTE(TEXTJOIN(" ",FALSE,C3:C186)," ","-")," ",""),,"-"))>9))
B4:B50B4=WORKDAY.INTL(B3,1,1,$A$3:$A$24)
 
Upvote 0
Hello James, thanks for helping. It seems like I was not able to explain the situation. So its like rewarding team members if they attend any event or training if they meet the attendance for fix number of days. In given example, that fix day was 10. I have attached an image with the requirement. Please help in same format. Regardless of how many days attended, just want to know the occurrences of 10 days consecutively.
 

Attachments

  • Screenshot 2023-05-15 235042.png
    Screenshot 2023-05-15 235042.png
    21.5 KB · Views: 7
Upvote 0
Try:
MrExcelPlayground17.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAP
1NameOccurances5/1/20235/2/20235/3/20235/4/20235/5/20235/6/20235/7/20235/8/20235/9/20235/10/20235/11/20235/12/20235/13/20235/14/20235/15/20235/16/20235/17/20235/18/20235/19/20235/20/20235/21/20235/22/20235/23/20235/24/20235/25/20235/26/20235/27/20235/28/20235/29/20235/30/20235/31/20236/1/20236/2/20236/3/20236/4/20236/5/20236/6/20236/7/20236/8/20236/9/2023
2John2111111111101111111111111
3Rose0110111111110111011111111
4Sonia1111111111111111111111101
5Alex1111111011111111111111111
6Nina2111111111110111111111111
Sheet11
Cell Formulas
RangeFormula
B2:B6B2=IFERROR(ROWS(FILTER(LEN(TEXTSPLIT(TEXTJOIN("",FALSE,C2:AP2),,"0")),LEN(TEXTSPLIT(TEXTJOIN("",FALSE,C2:AP2),,"0"))>9)),0)
 
Upvote 1
Solution
Hi James, your formula worked. You are amazing. Hoping to see you helping me with more complexed queries. Hurray! Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,695
Members
448,979
Latest member
DET4492

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