Excel 2010: Need formula to calculate hours/minutes required to perform task( but exclude weekends and holidays)

hinesgg

New Member
Joined
Jul 11, 2012
Messages
30
I2 = start time
J2 = end time
I2 and J2 are formatted as custom: m/d/yyyy h:mm

Named Range: Holidays includes holidays formatted as Date (*3/14/2001)

Trying to calculate how much time (in hours and minutes) lapses between I2 and J2, but exclude weekends and holidays
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

I found that and performed other searches and came up with this formula:

=((NETWORKDAYS(I2,J2,HOLIDAYS)-1)+MOD(J2,I2)-MOD(I2,1))*24

I2 contains 7/10/2012 7:50:00 AM
J2 contains 7/10/2012 1:03:00 AM
K2 contains formula above, producing result of 23673437:12 although format is set to Custom [h]:mm
What I expect to see is 5:13

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
 
Upvote 0
So now I have a couple of formulas, but neither workds for all situations. Here's what it looks like:

Date/Time CTM Requested Clarification</SPAN>Date/Time Clarification Received</SPAN>Time Spent Waiting for Clarification
(in Hours)</SPAN>
Approx Expected Result</SPAN>
7/10/12 7:50 AM7/10/12 1:03 PM5:135
6/27/12 12:10 PM7/3/12 9:00 AM32:5029
6/28/12 11:10 AM6/28/12 2:37 PM3:274
6/29/12 10:30 AM7/2/12 9:30 AM8:0023
7/2/12 9:33 AM7/2/12 12:44 PM3:113

<TBODY>
</TBODY><COLGROUP><COL><COL><COL><COL></COLGROUP>


The formula I'm currently using is this:
=(NETWORKDAYS(I2,J2,HOLIDAYS)-1)*(WorkdayEnd-WorkdayStart)+IF(NETWORKDAYS(J2,J2,HOLIDAYS),MEDIAN(MOD(J2,1),WorkdayEnd,WorkdayStart),WorkdayEnd)-MEDIAN(NETWORKDAYS(I2,I2,HOLIDAYS)*MOD(I2,1),WorkdayEnd,WorkdayStart)

And it works for all rows except row 4. I'm looking for something that will produce the results similar to those in column 4.





I found that and performed other searches and came up with this formula:

=((NETWORKDAYS(I2,J2,HOLIDAYS)-1)+MOD(J2,I2)-MOD(I2,1))*24

I2 contains 7/10/2012 7:50:00 AM
J2 contains 7/10/2012 1:03:00 AM
K2 contains formula above, producing result of 23673437:12 although format is set to Custom [h]:mm
What I expect to see is 5:13

<TBODY>
</TBODY>
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,662
Members
449,462
Latest member
Chislobog

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