I Need a formula to calculate the Turn Around Time

ahasan465231

New Member
Joined
Aug 10, 2022
Messages
7
Office Version
  1. 365
Ticket Open Date & Time: 8/6/2022 3:27:00 AM
Ticket Close Date & Time: 8/8/2022 3:57:32 PM
Business Hours: 08:00 AM to 00:00 AM (Midnight)
Non Business hours: 00:00 AM (Midnight) to 08:00 AM
Weekdays : Monday to Sunday
Weekends: no weekends & holidays
 
Ok then have you tried @JamesCanale suggestion in post #2 with the formula he suggested? Results are below:

Book1.xlsx
ABC
1OpenClosedResolve Time
28/5/2022 21:548/6/2022 14:2808:34
38/5/2022 22:168/6/2022 1:3701:44
48/5/2022 22:248/5/2022 23:0400:40
58/5/2022 22:448/6/2022 19:0712:23
68/5/2022 22:448/6/2022 13:3006:46
78/5/2022 23:288/5/2022 23:5300:25
88/6/2022 0:168/6/2022 0:4000:00
98/6/2022 0:558/6/2022 1:3300:00
108/6/2022 1:428/6/2022 21:5713:57
118/6/2022 5:428/6/2022 12:0204:02
Sheet1 (4)
Cell Formulas
RangeFormula
C2:C11C2=INT(((INT(B2)+(MAX(MOD(B2,1)-(1/3),0)*(24/16)))-(INT(A2)+(MAX(MOD(A2,1)-(1/3),0)*(24/16)))))+MOD(((INT(B2)+(MAX(MOD(B2,1)-(1/3),0)*(24/16)))-(INT(A2)+(MAX(MOD(A2,1)-(1/3),0)*(24/16)))),1)/(24/16)
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Dear All, this is just for your info, below formula really works and full fill my requirement,

=IF((INT(B2)=INT(A2)),(MEDIAN(MOD(B2,1),"24:00","08:00")-MEDIAN(MOD(A2,1),"24:00","08:00")),((INT(B2)-INT(A2))-0)*("24:00"-"08:00")+MEDIAN(MOD(B2,1),"24:00","08:00")-MEDIAN(MOD(A2,1),"24:00","08:00"))
 
Upvote 0
=IF((INT(B2)=INT(A2)),(MEDIAN(MOD(B2,1),"24:00","08:00")-MEDIAN(MOD(A2,1),"24:00","08:00")),((INT(B2)-INT(A2))-0)*("24:00"-"08:00")+MEDIAN(MOD(B2,1),"24:00","08:00")-MEDIAN(MOD(A2,1),"24:00","08:00"))

Thanks for letting us know... I also tested the formula in post #11 and the results are exactly the same... could you maybe tell us how you got to your formula?

The formula was from @JamesCanale I just put it to test in your table requirement.

=INT(((INT(B2)+(MAX(MOD(B2,1)-(1/3),0)*(24/16)))-(INT(A2)+(MAX(MOD(A2,1)-(1/3),0)*(24/16)))))+MOD(((INT(B2)+(MAX(MOD(B2,1)-(1/3),0)*(24/16)))-(INT(A2)+(MAX(MOD(A2,1)-(1/3),0)*(24/16)))),1)/(24/16)
 
Upvote 0
Thanks for letting us know... I also tested the formula in post #11 and the results are exactly the same... could you maybe tell us how you got to your formula?

The formula was from @JamesCanale I just put it to test in your table requirement.

=INT(((INT(B2)+(MAX(MOD(B2,1)-(1/3),0)*(24/16)))-(INT(A2)+(MAX(MOD(A2,1)-(1/3),0)*(24/16)))))+MOD(((INT(B2)+(MAX(MOD(B2,1)-(1/3),0)*(24/16)))-(INT(A2)+(MAX(MOD(A2,1)-(1/3),0)*(24/16)))),1)/(24/16)
Dear,
@JamesCanale formula doesn't work, when resolution total time in exceeding 24 hours, that formula add 8 hours per day, which you may review in attached snap shot, but as per my formula it gives the exact time (after excluding non business hours (00:00:00 to 08:00:00)).
 

Attachments

  • TAT Formula.PNG
    TAT Formula.PNG
    48.4 KB · Views: 2
Last edited:
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

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