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

PHIL.Pearce84

Board Regular
Joined
May 16, 2011
Messages
152
Office Version
  1. 365
Platform
  1. Windows
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

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).
Try something on the lines of

=NETWORKDAYS(week start, week end,SEQUENCE(holiday end - holiday start,,holiday start))
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,253
Members
448,556
Latest member
peterhess2002

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