Calculate whether a 24hr SLA was met using a Start and End Date/Time

mrlister2000

New Member
Joined
Jul 3, 2013
Messages
10
Hello everyone
First time poster so please be gentle!

on my spreadsheet i have the following fields :-

Date and Time ReceivedDate and Time SentTime TakenNumber of HoursWithin SLA?
04/03/2013 15:3820/03/2013 13:3915 days 22:0097YES

<colgroup><col span="2"><col><col><col></colgroup><tbody>
</tbody>

What's bugging me is that the number of hours is 97, yet the SLA is more than 24hrs so it should read NO. if it's 24hrs or less then it should read YES

I've used the following formulas :-

Time Taken : =INT(E4-D4) & " days " & TEXT(MOD(E4-D4,1),"[h]:mm")

Number of hours : =(NETWORKDAYS(D3,E3)-1)*("5:15 PM"-"9 AM")+MOD(E3,1)-MOD(D3,1)

Within SLA : =IF(G3<24, "YES","NO")

Please note that I am no expert at Excel so don't be fooled with the formulas above. They've been acquired or I've had assistance!

Thank you in advance for your help
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I can't see what's wrong here, but try: SLA : =IF(Value(G3)<24, "YES","NO"), instead, that might help.
 
Upvote 0
I can't see what's wrong here, but try: SLA : =IF(Value(G3)<24, "YES","NO"), instead, that might help.

That didn't work unfortunately, but thank you for your message.

I've set the Number of Hours column format to [h] if that helps anyone? I had it previously set at [h]mm:ss and that showed the number of Hours as 97:00:10

I'm wondering if the SLA formula is reading the 10 seconds as less than 24 and making it YES. Does that make sense?
 
Last edited:
Upvote 0
To get 97 in G3 that cell must be custom formatted as [h], so you are not comparing like with like because excel takes 24 to be 24 days and G3 is less than that because it's 97 hours

Change to this version=IF(G3<"24:00"+0, "YES","NO")
 
Upvote 0
To get 97 in G3 that cell must be custom formatted as [h], so you are not comparing like with like because excel takes 24 to be 24 days and G3 is less than that because it's 97 hours

Change to this version=IF(G3<"24:00"+0, "YES","NO")


Thank you Barry Houdini, that worked perfectly! (love the ID name!)
 
Upvote 0
just one more question that i forgot to put in my original post.

when calculating the Time Taken and subsequently the Number of Hours, I'm taking it that this is based on a 7-day week?

If so, can it be done in such a way that weekends aren't included please?

Thank you in advance once again
 
Upvote 0

Forum statistics

Threads
1,216,042
Messages
6,128,467
Members
449,455
Latest member
jesski

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