Elapsed Time Minus Holidays

kod2th3e

Board Regular
Joined
Apr 2, 2008
Messages
87
I would like to calculate the difference in time between two dates. Assuming that my company works 24/7 I would like to calculate the difference between an "IN" date/time and "FINISH" date/time skipping over any days that may be in a list of holidays.

So, if in cell A1 I have 9/11/2009 9:23 AM ("IN" date/time) and in cell B1 I have 9/14/2009 9:23 AM ("FINISH" date/time) and I have dates 9/12/2009, 9/15/2009, & 9/19/2009 in H1:H3 ("holiday list") then, I would like Cell C1 to display 48:00:00 because 9/12/2009 is in a list of holidays to skip over.

Otherwise. if 9/12/2009 wasn't in the list of holidays it should read 72:00:00.

If anyone could help with this, that'd be awesome, thanks for your time in viewing.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi,

Try:

Code:
=SUM(C2-C1)-COUNTA(HolidayList)

Where "HolidayList" is a named range containing your holidays, C1 is you start date and time and C2 is your end date and time.

HTH,

Jay
 
Upvote 0
I get a negative number when this is done, so the cell that this formula is in displays a whole bunch of pound (#) signs.
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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