Turnaround Time between date & time needed in hours excluding weekends and holidays

dawwni

New Member
Joined
Feb 10, 2023
Messages
19
Office Version
  1. 365
I need to calculate total turn around time between a start date and time and an end start and time. The turnaround time would be reported in total hours between the two and need to exclude weekends and holidays.
Example:
Date ReceivedTime ReceivedDate CompletedTime CompletedTurnaround Time in Hours
1/3/238:261/4/238:26
1/3/2313:151/4/2216:33

Please also clarify the cell formats in order for it to work. Thanks,
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
What are your standard weekend days? And Holidays are usually maintained in a table, so if you could give me an example of a few coming up for you it would be great, if not I'll assume Sat/Sun and just make up a holiday list.
 
Upvote 0
mr excel questions 12.xlsm
ABCDEFG
2Date ReceivedTime ReceivedDate CompletedTime CompletedTurnaround Time in Hours
32001-03-2308:262001-04-2308:26504.000Holiday List
42001-03-2313:152001-04-2216:33483.3002001-03-27
5
Sheet17
Cell Formulas
RangeFormula
E3:E4E3=24*NETWORKDAYS.INTL(A3,C3,1,$G$4)+((D3-B3)*24)
 
Upvote 0
The format in columns A, C, and G are YYYY-MM-DD.
Columns B & D are HH:MM:SS.

Column is decimal. the decimal portion is the decimal portion of an hour.

The holiday date is input into the 4th argument of the NetWorkdays.INTL function. If you add more holidays you will need to expand that part of the formula.
Using 24 hour time makes this a little easier. But, please test it out especiallally in instances where the finish date is a monday or day after holiday and the time is earlier than the start time. I'm not super certain of the various scenarios.

It is also counting full days. If you want only 8 hour days then you need to change the formula in column E by changing the 24 multiplier at the front to 8.
 
Upvote 0
The format in columns A, C, and G are YYYY-MM-DD.
Columns B & D are HH:MM:SS.

Column is decimal. the decimal portion is the decimal portion of an hour.

The holiday date is input into the 4th argument of the NetWorkdays.INTL function. If you add more holidays you will need to expand that part of the formula.
Using 24 hour time makes this a little easier. But, please test it out especiallally in instances where the finish date is a monday or day after holiday and the time is earlier than the start time. I'm not super certain of the various scenarios.

It is also counting full days. If you want only 8 hour days then you need to change the formula in column E by changing the 24 multiplier at the front
as I think on this i need to still adjust the hour component formula.
 
Upvote 0
well, it looks like the math took care of it all, so the above seems accurate. Here is my comparison. It may not be as thorough as you want. So please test to your satisfaction:
Cell Formulas
RangeFormula
E3:E14E3=NETWORKDAYS.INTL(A3,C3,1,$N$4)+IF(B3>D3,-1,0)
F3:F14F3=24*(NETWORKDAYS.INTL(A3,C3,1,$N$4)+IF(B3>D3,-1,0))
G3:G14G3=(IF(B3>D3,1,0)+D3-B3)*24
H3:H14H3=24*(NETWORKDAYS.INTL(A3,C3,1,$N$4)+IF(B3>D3,-1,0))+(IF(B3>D3,1,0)+D3-B3)*24
I3:I14I3=NETWORKDAYS.INTL(A3,C3,1,$N$4)
J3:J14J3=24*NETWORKDAYS.INTL(A3,C3,1,$N$4)
K3:K14K3=((D3-B3)*24)
L3:L14L3=24*NETWORKDAYS.INTL(A3,C3,1,$N$4)+((D3-B3)*24)
C4:C6,C8:C11,C13:C14,A5:A14C4=C3
C12C12=C11+4
 
Upvote 0
So it looks like the very first formula should work but instead of getting 24 hours for 1 day, it is calculating 48 hours. See 1st row and row 10 should be 3 hours. Do I have too many *24 in there? We want 24 hours per day, not 8 for just work hours.

In addition, we do get partials "delayed" so we calculate a separate TAT for those like in row 5.

QTYDate ReceivedTime ReceivedDate CompletedTime CompletedDate Partial ReceivedTime Partial Received# of Partial SamplesTAT in HrsPartial TAT in HrsHolidays
22023-01-038:262023-01-048:26
48.00​
2023-01-01​
82023-01-0313:152023-01-0416:33
51.30​
2023-05-29​
352023-01-049:302023-01-0514:07
52.62​
2023-07-04​
12023-01-04na2023-01-089:002023-01-0410:301
#VALUE!​
70.50​
2023-09-04​
22023-01-0410:002023-01-057:00
45.00​
2023-11-23​
12023-01-0420:002023-01-059:00
37.00​
2023-11-24​
42023-01-049:002023-01-0413:00
28.00​
2023-12-25​
102023-01-047:002023-01-0410:00
27.00​
2023-12-26​

Formula is 24*NETWORKDAYS.INTL(date received,date completed,1,$Holiday List)+((Time completed-time received)*24)

or =24*NETWORKDAYS.INTL(B2,D2,1,$K2:$K9)+((E2-C2)*24)

this is using 1 for Sat & Sun, if I wanted to include Fridays in the weekend I would use 7 instead, correct?

I just can't figure out why my base is 48 hours not 24? Thanks in advance.
 
Upvote 0
Also, I think it would be better if I wrote an IF statement for the Partials using the "# of Partials" column. Count IF H1>1, or am wrong on this assumption?
 
Upvote 0
Also, I think it would be better if I wrote an IF statement for the Partials using the "# of Partials" column. Count IF H1>1, or am wrong on this assumption?

I will crunch your latest table with what I have in my copy of the workbook. Will let you know.

As far a partials... can you explain how the math will work with that? Is it just that time start is different, or is there another indicator to delay the hours counting?
 
Upvote 0

Forum statistics

Threads
1,215,366
Messages
6,124,516
Members
449,168
Latest member
CheerfulWalker

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