Subtract date/time, but not include non-business hours

smllchng5

New Member
Joined
Sep 24, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
So I am fairly new to excel formulas, and have been asked to figure out the turn around time for projects in decimals. I have the following formular for if it is completed the same day (=(L3-F3)*24/8 )....so you can see that it works fine for the first 3 rows, but since the 4th one was started close to the end of the shift (Shift is 7:30am - 4:30pm) and then resumed at 9:30 am the next business day....how can I write a formula to take into account those hours not worked. Also,. what if it is a week-end. Any help would be greatly appreciated. TIA

1728343242376.png
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
smllchng Let's get the ball rolling. Here is my solution to your problem. It's in a very rough form but we have to start somewhere. Now this works for some of the scenarios but not all of them. As you think of more criteria you let us know. I do have one suggestion, if you do have a job that takes 2 days, can you put them on 2 lines. Anyway this usually generates more questions than answer so let the discussion begin.

24-10-07.xlsx
EFGHIJKL
1Date DeliveredTime DeliveredDate CompletedGroup Complet ed time (PST)StatusTAT7:30 AM4:30 PM
2
39/11/202410:00 AM9/11/20241:00 PMCompleted0.380.38
49/13/20249:00 AM9/13/20242:00 PMCompleted0.630.62
59/13/202410:00 AM9/13/20243:30 PMCompleted0.690.69
69/23/20244:30 PM9/24/20249:30 AMCompleted-0.880.25
79/27/20249:00 AM9/27/202411:15 AMCompleted0.280.28
89/28/20247:30 AM9/28/20244:30 PM1.13
99/29/20247:30 AM9/29/20249:30 AM0.25
1010/1/20243:30 PM10/2/20249:30 AM0.38
1110/3/20243:30 PM10/3/20244:30 PM0.13
1210/4/20247:30 AM10/4/20249:30 AM0.25
Data
Cell Formulas
RangeFormula
K3:K12K3=IF(G3>E3,($L$1-F3)*24/8+(H3-$K$1)*24/8,(H3-F3)*24/8)
 
Upvote 0

Forum statistics

Threads
1,223,103
Messages
6,170,123
Members
452,303
Latest member
c4cstore

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