Calculate working hours excl weekends and holidays

TriffyBoo

New Member
Joined
Oct 1, 2014
Messages
2
I need to calculate the number of working hours between two dates excluding weekends and bank holidays.
I found the following formula online somewhere and thought it was working brilliantly, but it doesn't seem to be excluding Saturdays

(NETWORKDAYS.INTL(STARTDT,ENDDT,11,Holidays)-1)*("17:00"-"8:30")+IF(NETWORKDAYS.INTL(ENDDT,ENDDT,11,Holidays),MEDIAN(MOD(ENDDT,1),"8:30","17:00"),"17:00")-MEDIAN(NETWORKDAYS.INTL(ENDDT,ENDDT,11,Holidays)*MOD(STARTDT,1),"8:30","17:00"))

The holidays is from a range of cells elsewhere on the sheet e.g Z1:Z15

I am not great with excel, can copy formulas but I don't necessarily understand them, so please keep it as simple as possible!!

Please can anyone help me?
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,249
Office Version
  1. 365
Platform
  1. Windows
I wasn't familiar with the formula but looking you need to change the 11 you have there to a 1. Or use networkdays which is fixed mon-fri.
 

TriffyBoo

New Member
Joined
Oct 1, 2014
Messages
2
Thanks so much - that's the problem with just copying and pasting without understanding how it works!
 

Watch MrExcel Video

Forum statistics

Threads
1,122,552
Messages
5,596,801
Members
414,103
Latest member
imamalidadashzada

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