Calculate number of working days (excluding holydays) month by month

cbprado

New Member
Joined
Oct 26, 2018
Messages
10
This is to calculate # of workdays per month in a project

A2 and B2 I´ll have start and end dates, c1 - q1 I´ll have the months (jan-dec)

holydays will be on a named array sized 2cx8r.

thanx
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Perhaps:

ABCDEFGHIJKLMN
1JanFebMarAprMayJunJulAugSepOctNovDec
22/25/201910/15/201903202122202321211000
3
4
512/5/2019
622/27/2019
733/1/2019
844/9/2019
955/6/2019
1068/8/2019
11710/11/2019
12812/12/2019

<tbody>
</tbody>
Sheet3

Worksheet Formulas
CellFormula
C2=MAX(0,NETWORKDAYS(MAX($A$2,C1),MIN($B$2,EOMONTH(C1,0)),INDEX(HolyDays,0,2)))

<tbody>
</tbody>

<tbody>
</tbody>


Workbook Defined Names
NameRefers To
HolyDays=Sheet3!$A$5:$B$12

<tbody>
</tbody>

<tbody>
</tbody>



Note that the values in C1:N1 are actual dates, the 1st of each month, and I use a custom format of mmm to just show the month. Range A5:B12 is the HolyDays range, you can of course put it anywhere. If you have different weekend requirements, you can use NETWORKDAYS.INTL instead.
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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