Work Days and Holiday Hours

DarrenF

Board Regular
Joined
Jun 9, 2014
Messages
90
Hello,

I have created the below formula, which I'm trying to remove weekends and company holidays. I have a table built on another worksheet (worksheet name = Workings). For some reason it's not removing the time even though I have the date in the table.

=IF(H2="","",IF(G2<>"CS Tech Team Queue","",((NETWORKDAYS(F2,H2,holidaylist)-1)*("17:00"-"5:00")+IF(NETWORKDAYS(H2,H2,holidaylist),MEDIAN(MOD(H2,1),"17:00","5:00"),"17:00")-MEDIAN(NETWORKDAYS(F2,F2,holidaylist)*MOD(F2,1),"17:00","5:00"))*24))
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Narrowed it down to it not recognizing all the dates in my "holidaylist" table. I have 2016 and 2017 working fine, but when I added 2018 it doesn't recognize it. If I paste the dates into 2016 or 2017, it works fine. But it won't let me extend the list.
 
Upvote 0
If holidaylist is a static range, you need to extend it to include the additional dates. Or make it a dynamic range.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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