Calculating Networkdays Between Two Dates (Factoring in Work Received Outside of Business Hours) for SLA

Funkybot

New Member
Joined
Aug 3, 2017
Messages
2
Hi, I'm having trouble coming up with a formula (or formulas) needed as part of an SLA calculation.

A1: Case Received Date and Time (in MM/DD/YYYY hh:mm AM/PM format)
B1: Case Completed Date and Time (same format)

I need to compare these two dates to identify if the case was completed within the SLA. The SLA rules are: 1) cases received on a workday before 5PM must be responded by 5PM the next workday, and 2) if a case received outside of business hours, it will be considered as having been received during the next workday.

Example 1: a Case Received Friday at 4:58PM must be completed by Monday at 5PM. If yes, it "Made Service," if completed after Monday at 5PM, it "Missed Service."
Example 2: a Case Received Friday at 5:01PM (or Saturday or Sunda) must be completed by Tuesday at 5PM.

I want to use the NetWorkDays function so I can exclude holidays.

So far, I've split out the Date and Time into different columns, and used the Net Work Day function to calculate business days between the start and end date, then an "IF" statement combined with the TIME function to determine if an email was completed before or after 5PM. Where I've gotten stuck is how to tell Excel that a case received after 5PM should count towards the next day. Hoping someone here can help.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try this:

=IF(WORKDAY(WORKDAY(A1+"6:59:59"-1,1),1)+"17:00" < B1,"Missed Service","Made Service")
 
Upvote 0
Try this:

=IF(WORKDAY(WORKDAY(A1+"6:59:59"-1,1),1)+"17:00" < B1,"Missed Service","Made Service")

Thanks! That seems to do it. I just tweaked the start time to 7:59;59 and added in the holidays (in cells H2;H11). The end result looked like this and seems to work perfectly so far:

=IF(WORKDAY(WORKDAY(A1+"7:59:59"-1,1,$h$2:$h$11),1,$h$2:$h$11)+"17:00" < B1,"Missed Service","Made Service")
 
Upvote 0

Forum statistics

Threads
1,215,343
Messages
6,124,405
Members
449,157
Latest member
mytux

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