I am desperately seeking a networkday formula that calculates for each employee:
the available working days between 2 dates (the below is on a tab named 'Project' with Employee in column A),
ROW A B C
1 Employee Start End
2 AS123 15/01/2024 16/02/2024
3 AP345 10/03/2024 14/03/2024
4 AP346 29/12/2023 29/03/2024
5 AP234 5/12/2023 2/02/2024
Which excludes public holidays (the below is on a tab named 'NSW Public Hol' with dates in column D),
D
Labour Day 2/10/2023
Christmas Day 25/12/2023
Boxing Day 26/12/2023
Picnic Day 27/12/2023
New Year's Day 1/01/2024
Australia Day 26/01/2024
Good Friday 29/03/2024
Easter Saturday 30/03/2024
Easter Sunday 31/03/2024
Easter Monday 1/04/2024
Anzac Day 25/04/2024
King's Birthday 10/06/2024
bank holiday 5/08/2024
Labour Day 7/10/2024
Christmas Day 25/12/2024
Boxing Day 26/12/2024
and also excludes any leave holidays for the employee (located in a third tab). the leave start and end periods taken by each employee are below:
ROW A B C
1 Employee Start End
2 AS123 11/02/2024 19/02/2024
3 AP345 12/03/2024 19/03/2024
4 AS123 7/02/2024 10/02/2024
5 AP346 10/02/2024 19/02/2024
6 AP234 10/02/2024 19/02/2024
7 AP345 10/02/2024 19/02/2024
As you may see, employee AS123 has a project starting on the 15/01/2024 and ending on the 16/02/2024.
Employee AS123 has leave start on the 11/02/2024 and end 19/02/2024. this means, 4 days of the holiday are during the project period.
Employee AS123 also has another leave start on the 7/02/2024 and end 10/02/2024. this means, another 4 days of the holiday are during the project period. In total, 8 days of leave during the project period across 2 different entries.
Australia day is on the 26/01/24 which also needs to be excluded form the working days available.
I have tired a few formulas including this on albeit, didn't capture all the leave dates that fell within the project period as per the attached spreadsheet:
=NETWORKDAYS(B2, C2)-SUMPRODUCT(--(Leave!$A$2:$A$100=A2), --(Leave!$B$2:$B$100<=C2), --(Leave!$C$2:$C$100>=B2)) - COUNTIFS('NSW Public Hol'!$D$2:$D$100,">="&B2, 'NSW Public Hol'!$D$2:$D$100,"<="&C2)
This is my first post and I thank you all in advice for you help. I've been on this now for 3 days and thought it best to reach out to the experts![]()
Bookmarks