Array to list all workdays for a month

jl2509

Board Regular
Joined
Oct 30, 2015
Messages
198
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Can you please help and show how to list all workdays for a month as shown in the example
The dates for each month in the top row should pick up from the last date of the previous month.

I assume this would be a SEQUENCE formula with EOMONTH in cells C4, F4, I4 etc, but I am stuck.
This would also be nice to have if the list of holidays shown in the image were omitted. These are referenced in a Holidays Tab from Cell A1:C8


1698840364856.png
1698840492964.png
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Maybe
Fluff.xlsm
ABCDE
12024
2
3JanFeb
4Mon, 1 JanuaryThu, 1 February
5Tue, 2 JanuaryFri, 2 February
6Wed, 3 JanuaryMon, 5 February
7Thu, 4 JanuaryTue, 6 February
8Fri, 5 JanuaryWed, 7 February
9Mon, 8 JanuaryThu, 8 February
10Tue, 9 JanuaryFri, 9 February
11Wed, 10 JanuaryMon, 12 February
12Thu, 11 JanuaryTue, 13 February
13Fri, 12 JanuaryWed, 14 February
14Mon, 15 JanuaryThu, 15 February
15Tue, 16 JanuaryFri, 16 February
16Wed, 17 JanuaryMon, 19 February
17Thu, 18 JanuaryTue, 20 February
18Fri, 19 JanuaryWed, 21 February
19Mon, 22 JanuaryThu, 22 February
20Tue, 23 JanuaryFri, 23 February
21Wed, 24 JanuaryMon, 26 February
22Thu, 25 JanuaryTue, 27 February
23Fri, 26 JanuaryWed, 28 February
24Mon, 29 JanuaryThu, 29 February
25Tue, 30 January
26Wed, 31 January
27
Data
Cell Formulas
RangeFormula
C4:C26C4=LET(d,DATE(C1,1,1),n,NETWORKDAYS(d,EOMONTH(d,0),Holidays!A1:A8),WORKDAY(d,SEQUENCE(n,,0),Holidays!A1:A8))
E4:E24E4=LET(d,DATE(C1,2,1),n,NETWORKDAYS(d,EOMONTH(d,0),Holidays!A1:A8),WORKDAY(d,SEQUENCE(n,,0),Holidays!A1:A8))
Dynamic array formulas.
 
Upvote 0
Hi Fluff

Details update. I'm using 365 Business on Windows 11

Currently I have the following in Cell C4: =SEQUENCE(DAY(EOMONTH(C$3&$C$1,0)),1,C$3&$C$1,1)
which produces all days of the month but I don't want weekends and as mentioned the nice to have would be to omit the holidays

1698841608551.png
 
Upvote 0
I have used the formulas as you suggest but it is not discounting the holiday on the 1st Jan?
 
Upvote 0
In that case can you post your data from the holiday sheet (not an image)

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Hi
Unfortunately I cannot install add-ins as they are disabled
 
Upvote 0
The only dates which are not being omitted are the dates on the 1st of the month (1st Jan and 1st Apr). All other dates are omitted as expected.
I tested this by Changing 25th Dec to 1st Dec and it was the same result.

25th Dec now shows in the list but so does the 1st Dec.
 
Upvote 0
Ok, how about
Excel Formula:
=LET(d,DATE(C1,1,1),n,NETWORKDAYS(d,EOMONTH(d,0),Holidays!A1:A8),WORKDAY(d-1,SEQUENCE(n),Holidays!A1:A8))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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