Calculating NETWORKDAYS considering leaves and holidays for each employee

dpkdileep

New Member
Joined
Jul 27, 2019
Messages
7
Hi,

I have some data where the networkdays to be calculated for each activity.
Also, the leaves of each person and the common holidays are to be considered in the calculation.


RowCol ACol BCol CCol D
1ABCCommon Holiday
23-Sep-1919-Sep-1916-Sep-199-Sep-19
313-Sep-1920-Sep-1920-Sep-1911-Sep-19
414-Sep-1923-Sep-19

<tbody>
</tbody>










RowCol FCol GCol HCol ICol J
1Activity NamePoC NameStart DateEnd DateTotal Workdays
2XXA2-Sep-195-Sep-193
3YYB6-Sep-1910-Sep-193
4ZZC12-Sep-1917-Sep-193
5AAB2-Sep-195-Sep-194
6BBC6-Sep-1910-Sep-193
7CCA12-Sep-1917-Sep-193

<tbody>
</tbody>



















I am able to get the results separately.
For leaves: Nested IF function for each person.
For Common holidays: Normal "Holidays" option available within NETWORKDAYS function in excel.

I have used the following formula for the result in column J:
=IF(G2="A",NETWORKDAYS(H2,I2,$A$2:$A$4),IF(G2="B",NETWORKDAYS(H2,I2,$B$2:$B$6),IF(G2="C",NETWORKDAYS(H2,I2,$C$2:$C$6))))


Can someone help me to integrate leaves and common holidays into the calculation in a simple manner.
I do not wish to use nested IF as the real data contains more than 50 personnel.

Thanks in advance.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This should do it

=NETWORKDAYS(H2,I2,CHOOSE({1,2},INDEX($A$2:$C$4,0,MATCH(G2,$A$1:$C$1,0)),$D$2:$D$4))
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,892
Members
449,058
Latest member
Guy Boot

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