Complex “consecutive weekday” formula

bsafra1

New Member
Joined
Sep 11, 2020
Messages
3
Office Version
  1. 365
Platform
  1. MacOS
Hi, I have a report of employee IDs that contain information regarding those employees across a 98 day period. There is one row per employee per date, so one employee ID may have up to 98 rows of data but may have less.

Let’s say I have a second tab that removes duplicate Employee IDs and contains just a column of unique Employee IDs. If I wanted to add a column to the second tab that contains either a “Yes” or a “No” depending on whether there were any 10 consecutive weekdays of rows for the given Employee ID on the first tab, what is the best way to set that up?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Do you want to include days off / holidays as a weekday? in otherwords are you using a workweek (5 or 6 day) or an entire week? What about Holidays?
 
Upvote 0
OKay, well, I was working on both ways. Use the 5 Day Week Formula. See if it works for you:
Book1
ABCDEFG
15 Day Workweek7 Day Workweek5 Day Workweek7 Day Workweek
2Empl1Fri 2023-09-01Sat 2023-09-02Empl1NoYes
3Empl1Mon 2023-09-04Sun 2023-09-03Empl2YesNo
4Empl1Tue 2023-09-05Mon 2023-09-04Empl3YesNo
5Empl1Wed 2023-09-06Tue 2023-09-05
6Empl1Mon 2023-09-11Tue 2023-09-12
7Empl1Tue 2023-09-12Wed 2023-09-13
8Empl1Wed 2023-09-13Thu 2023-09-14
9Empl1Fri 2023-09-15Fri 2023-09-15
10Empl1Mon 2023-09-18Sat 2023-09-16
11Empl1Wed 2023-09-20Sun 2023-09-17
12Empl1Thu 2023-09-21Mon 2023-09-18
13Empl1Fri 2023-09-22Tue 2023-09-19
14Empl1Mon 2023-09-25Wed 2023-09-20
15Empl1Tue 2023-09-26Thu 2023-09-21
16Empl1Wed 2023-09-27Fri 2023-09-22
17Empl1Thu 2023-09-28Sat 2023-09-23
18Empl1Fri 2023-09-29Sun 2023-09-24
19Empl1Mon 2023-10-02Mon 2023-09-25
20Empl1Wed 2023-10-04Tue 2023-09-26
21Empl1Thu 2023-10-05Wed 2023-09-27
22Empl2Fri 2023-09-08Thu 2023-09-28
23Empl2Mon 2023-09-11Fri 2023-09-29
24Empl2Tue 2023-09-12Wed 2023-10-04
25Empl2Wed 2023-09-13Thu 2023-10-05
26Empl2Thu 2023-09-14Fri 2023-10-06
27Empl2Fri 2023-09-15Sat 2023-10-07
28Empl2Mon 2023-09-18Sun 2023-10-08
29Empl2Tue 2023-09-19Mon 2023-10-09
30Empl2Wed 2023-09-20Tue 2023-10-10
31Empl2Thu 2023-09-21Wed 2023-10-11
32Empl2Fri 2023-09-22Thu 2023-10-12
33Empl2Mon 2023-09-25Fri 2023-10-13
34Empl2Tue 2023-09-26Sat 2023-10-14
35Empl2Wed 2023-09-27Sun 2023-10-15
36Empl2Thu 2023-09-28Mon 2023-10-16
37Empl2Fri 2023-09-29Tue 2023-10-17
38Empl2Mon 2023-10-02Wed 2023-10-18
39Empl2Tue 2023-10-03Thu 2023-10-19
40Empl2Wed 2023-10-04Fri 2023-10-20
41Empl2Thu 2023-10-05Sat 2023-10-21
42Empl2Fri 2023-10-06Sun 2023-10-22
43Empl2Mon 2023-10-09Mon 2023-10-23
44Empl2Tue 2023-10-10Tue 2023-10-24
45Empl2Wed 2023-10-11Wed 2023-10-25
46Empl2Thu 2023-10-12Thu 2023-10-26
47Empl2Fri 2023-10-13Fri 2023-10-27
48Empl2Mon 2023-10-16Sat 2023-10-28
49Empl2Tue 2023-10-17Sun 2023-10-29
50Empl2Wed 2023-10-18Mon 2023-10-30
51Empl2Thu 2023-10-19Tue 2023-10-31
52Empl2Fri 2023-10-20Wed 2023-11-01
53Empl2Mon 2023-10-23Thu 2023-11-02
54Empl2Tue 2023-10-24Fri 2023-11-03
55Empl2Wed 2023-10-25Sat 2023-11-04
56Empl3Fri 2023-09-08Sun 2023-11-05
57Empl3Mon 2023-09-11Mon 2023-11-06
58Empl3Tue 2023-09-12Tue 2023-11-07
59Empl3Wed 2023-09-13Wed 2023-11-08
60Empl3Thu 2023-09-14Sat 2023-11-11
61Empl3Fri 2023-09-15Sun 2023-11-12
62Empl3Mon 2023-09-18Mon 2023-11-13
63Empl3Tue 2023-09-19Tue 2023-11-14
64Empl3Wed 2023-09-20Wed 2023-11-15
65Empl3Thu 2023-09-21Thu 2023-11-16
66Empl3Fri 2023-09-22Fri 2023-11-17
67Empl3Mon 2023-09-25Sat 2023-11-18
68Empl3Tue 2023-09-26Sun 2023-11-19
69Empl3Wed 2023-09-27Mon 2023-11-20
70Empl3Thu 2023-09-28Fri 2023-11-24
71Empl3Fri 2023-09-29Sat 2023-11-25
72Empl3Mon 2023-10-02Sun 2023-11-26
73Empl3Tue 2023-10-03Mon 2023-11-27
74Empl3Wed 2023-10-04Wed 2023-11-29
75Empl3Thu 2023-10-05Thu 2023-11-30
76Empl3Fri 2023-10-06Fri 2023-12-01
77Empl3Sat 2023-10-07Sat 2023-12-02
78Empl3Sun 2023-10-08Sun 2023-12-03
79Empl3Mon 2023-10-09Mon 2023-12-04
80Empl3Tue 2023-10-10Tue 2023-12-05
81
bsafra
Cell Formulas
RangeFormula
F2:F4F2=IF(ISNUMBER(MATCH(0,WORKDAY.INTL(TAKE(CHOOSECOLS(FILTER($A$2:$B$80,$A$2:$A$80=E2,""),2),ROWS(FILTER($A$2:$B$80,$A$2:$A$80=E2,""))-10),10,1) - TAKE(CHOOSECOLS(FILTER($A$2:$B$80,$A$2:$A$80=E2,""),2),10-ROWS(FILTER($A$2:$B$80,$A$2:$A$80=E2,""))),0)), "Yes","No")
G2G2=IF(ISNUMBER(MATCH(0, TAKE(CHOOSECOLS(FILTER($A$2:$C$80,$A$2:$A$80=E2,""),3),10-ROWS(FILTER($A$2:$C$80,$A$2:$A$80=E2,"")))-10 - TAKE(CHOOSECOLS(FILTER($A$2:$C$80,$A$2:$A$80=E2,""),3),ROWS(FILTER($A$2:$C$80,$A$2:$A$80=E2,""))-10),0)), "Yes","No")
G3:G4G3=IF(ISNUMBER(MATCH(0, TAKE(CHOOSECOLS(FILTER($A$2:$C$80,$A$2:$A$80=G22,""),3),10-ROWS(FILTER($A$2:$C$80,$A$2:$A$80=G22,"")))-10 -TAKE(CHOOSECOLS(FILTER($A$2:$C$80,$A$2:$A$80=G22,""),3),ROWS(FILTER($A$2:$C$80,$A$2:$A$80=G22,""))-10),0)), "Yes","No")
B19B19=B18+3
 
Upvote 0

Forum statistics

Threads
1,215,096
Messages
6,123,074
Members
449,093
Latest member
ripvw

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