You can consider or ignore the following. I initially had trouble getting both Jan and May to show correct answers and then was side tracked.
I didn't notice that Fluff had provided a solution that works.
N.B.
Ensure that your holiday list is for 2024.
Test the following
with Name Manager
Name the function to a name that you prefer; I named it ListWorkdaysMo
The function shows the parameters required Year, Month (full name or 3 letters), and holidays.
Value
=LAMBDA(Year,Month,Holidays,LET(y,Year,m,Month,h,Holidays,d,DATE(y,MONTH(--1&LEFT(m,3)),1),n,WORKDAY.INTL(d-1,SEQUENCE(24),1,h),IF(MONTH
=MONTH(d),n,"")))
LAMBDA.xlsm |
---|
|
---|
| A | B | C | D | E | F | G | H | I |
---|
1 | Hol | | 2024 | | | | | | |
---|
2 | 1-Jan-24 | | | | | | | | |
---|
3 | 22-May-24 | | | | January | Feb | Mar | Apr | May |
---|
4 | | | | | Tue 02-Jan-24 | Thu 01-Feb-24 | Fri 01-Mar-24 | Mon 01-Apr-24 | Wed 01-May-24 |
---|
5 | | | | | Wed 03-Jan-24 | Fri 02-Feb-24 | Mon 04-Mar-24 | Tue 02-Apr-24 | Thu 02-May-24 |
---|
6 | 01-01-24 | | | | Thu 04-Jan-24 | Mon 05-Feb-24 | Tue 05-Mar-24 | Wed 03-Apr-24 | Fri 03-May-24 |
---|
7 | Fri 31-May-24 | | | | Fri 05-Jan-24 | Tue 06-Feb-24 | Wed 06-Mar-24 | Thu 04-Apr-24 | Mon 06-May-24 |
---|
8 | 108 | | | | Mon 08-Jan-24 | Wed 07-Feb-24 | Thu 07-Mar-24 | Fri 05-Apr-24 | Tue 07-May-24 |
---|
9 | | | | | Tue 09-Jan-24 | Thu 08-Feb-24 | Fri 08-Mar-24 | Mon 08-Apr-24 | Wed 08-May-24 |
---|
10 | | | | | Wed 10-Jan-24 | Fri 09-Feb-24 | Mon 11-Mar-24 | Tue 09-Apr-24 | Thu 09-May-24 |
---|
11 | | | | | Thu 11-Jan-24 | Mon 12-Feb-24 | Tue 12-Mar-24 | Wed 10-Apr-24 | Fri 10-May-24 |
---|
12 | | | | | Fri 12-Jan-24 | Tue 13-Feb-24 | Wed 13-Mar-24 | Thu 11-Apr-24 | Mon 13-May-24 |
---|
13 | | | | | Mon 15-Jan-24 | Wed 14-Feb-24 | Thu 14-Mar-24 | Fri 12-Apr-24 | Tue 14-May-24 |
---|
14 | | | | | Tue 16-Jan-24 | Thu 15-Feb-24 | Fri 15-Mar-24 | Mon 15-Apr-24 | Wed 15-May-24 |
---|
15 | | | | | Wed 17-Jan-24 | Fri 16-Feb-24 | Mon 18-Mar-24 | Tue 16-Apr-24 | Thu 16-May-24 |
---|
16 | | | | | Thu 18-Jan-24 | Mon 19-Feb-24 | Tue 19-Mar-24 | Wed 17-Apr-24 | Fri 17-May-24 |
---|
17 | | | | | Fri 19-Jan-24 | Tue 20-Feb-24 | Wed 20-Mar-24 | Thu 18-Apr-24 | Mon 20-May-24 |
---|
18 | | | | | Mon 22-Jan-24 | Wed 21-Feb-24 | Thu 21-Mar-24 | Fri 19-Apr-24 | Tue 21-May-24 |
---|
19 | | | | | Tue 23-Jan-24 | Thu 22-Feb-24 | Fri 22-Mar-24 | Mon 22-Apr-24 | Thu 23-May-24 |
---|
20 | | | | | Wed 24-Jan-24 | Fri 23-Feb-24 | Mon 25-Mar-24 | Tue 23-Apr-24 | Fri 24-May-24 |
---|
21 | | | | | Thu 25-Jan-24 | Mon 26-Feb-24 | Tue 26-Mar-24 | Wed 24-Apr-24 | Mon 27-May-24 |
---|
22 | | | | | Fri 26-Jan-24 | Tue 27-Feb-24 | Wed 27-Mar-24 | Thu 25-Apr-24 | Tue 28-May-24 |
---|
23 | | | | | Mon 29-Jan-24 | Wed 28-Feb-24 | Thu 28-Mar-24 | Fri 26-Apr-24 | Wed 29-May-24 |
---|
24 | | | | | Tue 30-Jan-24 | Thu 29-Feb-24 | Fri 29-Mar-24 | Mon 29-Apr-24 | Thu 30-May-24 |
---|
25 | | | | | Wed 31-Jan-24 | | | Tue 30-Apr-24 | Fri 31-May-24 |
---|
26 | | | | | | | | | |
---|
27 | | | | | | | | | |
---|
28 | | | | | Jan | Feb | Mar | Apr | May |
---|
29 | | | | | Tue 02-Jan-24 | Thu 01-Feb-24 | Fri 01-Mar-24 | Mon 01-Apr-24 | Wed 01-May-24 |
---|
30 | | | | | Wed 03-Jan-24 | Fri 02-Feb-24 | Mon 04-Mar-24 | Tue 02-Apr-24 | Thu 02-May-24 |
---|
31 | | | | | Thu 04-Jan-24 | Mon 05-Feb-24 | Tue 05-Mar-24 | Wed 03-Apr-24 | Fri 03-May-24 |
---|
32 | | | | | Fri 05-Jan-24 | Tue 06-Feb-24 | Wed 06-Mar-24 | Thu 04-Apr-24 | Mon 06-May-24 |
---|
33 | | | | | Mon 08-Jan-24 | Wed 07-Feb-24 | Thu 07-Mar-24 | Fri 05-Apr-24 | Tue 07-May-24 |
---|
34 | | | | | Tue 09-Jan-24 | Thu 08-Feb-24 | Fri 08-Mar-24 | Mon 08-Apr-24 | Wed 08-May-24 |
---|
35 | | | | | Wed 10-Jan-24 | Fri 09-Feb-24 | Mon 11-Mar-24 | Tue 09-Apr-24 | Thu 09-May-24 |
---|
36 | | | | | Thu 11-Jan-24 | Mon 12-Feb-24 | Tue 12-Mar-24 | Wed 10-Apr-24 | Fri 10-May-24 |
---|
37 | | | | | Fri 12-Jan-24 | Tue 13-Feb-24 | Wed 13-Mar-24 | Thu 11-Apr-24 | Mon 13-May-24 |
---|
38 | | | | | Mon 15-Jan-24 | Wed 14-Feb-24 | Thu 14-Mar-24 | Fri 12-Apr-24 | Tue 14-May-24 |
---|
39 | | | | | Tue 16-Jan-24 | Thu 15-Feb-24 | Fri 15-Mar-24 | Mon 15-Apr-24 | Wed 15-May-24 |
---|
40 | | | | | Wed 17-Jan-24 | Fri 16-Feb-24 | Mon 18-Mar-24 | Tue 16-Apr-24 | Thu 16-May-24 |
---|
41 | | | | | Thu 18-Jan-24 | Mon 19-Feb-24 | Tue 19-Mar-24 | Wed 17-Apr-24 | Fri 17-May-24 |
---|
42 | | | | | Fri 19-Jan-24 | Tue 20-Feb-24 | Wed 20-Mar-24 | Thu 18-Apr-24 | Mon 20-May-24 |
---|
43 | | | | | Mon 22-Jan-24 | Wed 21-Feb-24 | Thu 21-Mar-24 | Fri 19-Apr-24 | Tue 21-May-24 |
---|
44 | | | | | Tue 23-Jan-24 | Thu 22-Feb-24 | Fri 22-Mar-24 | Mon 22-Apr-24 | Thu 23-May-24 |
---|
45 | | | | | Wed 24-Jan-24 | Fri 23-Feb-24 | Mon 25-Mar-24 | Tue 23-Apr-24 | Fri 24-May-24 |
---|
46 | | | | | Thu 25-Jan-24 | Mon 26-Feb-24 | Tue 26-Mar-24 | Wed 24-Apr-24 | Mon 27-May-24 |
---|
47 | | | | | Fri 26-Jan-24 | Tue 27-Feb-24 | Wed 27-Mar-24 | Thu 25-Apr-24 | Tue 28-May-24 |
---|
48 | | | | | Mon 29-Jan-24 | Wed 28-Feb-24 | Thu 28-Mar-24 | Fri 26-Apr-24 | Wed 29-May-24 |
---|
49 | | | | | Tue 30-Jan-24 | Thu 29-Feb-24 | Fri 29-Mar-24 | Mon 29-Apr-24 | Thu 30-May-24 |
---|
50 | | | | | Wed 31-Jan-24 | | | Tue 30-Apr-24 | Fri 31-May-24 |
---|
|
---|