Time spent calculation: exclude non-business hours and weekends

ebrandonwhite

New Member
Joined
Jun 11, 2010
Messages
6
Thanks in advance for any help that can be offered.

I am using Excel 2007.

Variables:
StartDT = The time the ticket came into the system
EndDT = The time the agent closed the ticket
StartTime = The time the business day starts
StopTime = The time the business day ends
TimeSpent = The calculated time spent

Business hours are 0600 - 1800.

Weekends and after hours are not included in time spent.

ex.
StartDT
4/9/2010 17:00

EndDT
4/12/2010 7:00

Scenario: A case comes in at 17:00 on Friday 4/9/2010. The case is closed at 07:00 on Monday 4/12/2010. Total time spent (calculated manually) is 2 hours.

So the columns would look like:

|StartDT|EndDT|StartTime|StopTime|TimeSpent|


So what I need is a formula for the TimeSpent column that calculates the time spent using the given information in the previous columns.

Thanks!
 
I need to make a similar calculation to calculate the total time where BH is between 9:00 AM to 5:00 PM Monday to Friday but exclude the pause time from the list. Also the holiday list & weekend to be excluded.


Initial Status DateTime In Initial Status (sec)Initial StatusFinal StatusTransition DateTransition UserTime In Final Status(sec)Remarks
04-10-2016 10:58:43 PM839OpenWork In Progress04-10-2016 11:12:42 PM00:13:5987997Start time
04-10-2016 11:12:42 PM87997Work In ProgressResolution Set05-10-2016 11:39:19 PM00:26:3711Continue time
05-10-2016 11:39:19 PM11Resolution SetSolution Delivered05-10-2016 11:39:30 PM00:00:1162545Continue time
05-10-2016 11:39:30 PM62545Solution DeliveredSolution Verified06-10-2016 05:01:55 PM17:22:251Pause time
06-10-2016 05:01:55 PM1Solution VerifiedClosed06-10-2016 05:01:56 PM00:00:0120332End Time

<colgroup><col><col span="3"><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Assuming that StartDT and EndDT are always within business hours you can use this formula

=(NETWORKDAYS(StartDT,EndDT)-1)*(StopTime-StartTime)+MOD(EndDT,1)-MOD(StartDT,1)

format result cell as [h]:mm


Hey Barry,

The situation here is Work comes in from Monday to Friday, 08:00am to 05:00pm. Work MUST come in during working hours but can be completed outside working hours and days. I need the formula that counts that when work is resolved outside working hours, it takes resolution time as in the previous working day at 05:00PM

Thanks
 
Upvote 0
Guys, I need your help in calculating outage hours based on the below criteria:

Start Date & Time (A2)
End Date & Time (B2)
Daily Working Hours from 10:00 to 23:00
Friday working Hours are from 13:30 to 23:00
No days off and no holidays whatsoever
 
Upvote 0

Forum statistics

Threads
1,215,842
Messages
6,127,230
Members
449,371
Latest member
strawberrish

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