Count number of working date between dates, that fall within another date range

PHIL.Pearce84

Board Regular
Joined
May 16, 2011
Messages
144
Hi There,

Hope someone can help me?

I'm trying to do some work on resource analysis, essentially what I want to do is count the number of working dates between two dates where someone has booked holiday, and display how many of those days fall within another date range, this could have multiple people within a team.

For example:

Person A books the following holiday:

Start Date 22/7/21 End Date 30/7/21

Person B books the following Holiday within the same team:

Start Date 19/7/21 End Date 30/7/21

This would be 17 working days

On another tab I have the following:

Week 1 Start Date 19/7/21 End Date 23/7/21

Week 2 Start Date 26/7/21 End Date 30/7/21

I want to be able to display that the holiday covers a 2 working week range so:

eek 1 Start Date 19/7/21 End Date 23/7/21 = 7 Days

Week 2 Start Date 26/7/21 End Date 30/7/21 = 10Days

I was trying to use the formula below, but cant seem to get it to work as a range on the holiday tab, works find when the holiday range if set to two cells only but not if Im trying to pick up multiple team members by using a range.

=MAX(MIN(D4,'Itrent Data Dump'!$E$2:$E$122)-MAX(C4,'Itrent Data Dump'!$D$2:$D$122)+1,0)

Any help would be greatly appreciated.

Thanks
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
14,621
Office Version
  1. 365
Platform
  1. Windows
Try something on the lines of

=NETWORKDAYS(week start, week end,SEQUENCE(holiday end - holiday start,,holiday start))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,126
Messages
5,768,264
Members
425,460
Latest member
Astros1243

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
Top