Long shot! - Using time stamps, identify how much time was over the weekend

Peptide

Board Regular
Joined
Apr 12, 2016
Messages
224
Office Version
  1. 365
Platform
  1. Windows
Hello, Trying to use time to figure out if a machines down time falls into the weekend or non working hours.

Down time date stamps we have for a certain machine
Start Date/Time: 9/13/19 10:00 (this is a Friday)
End Date/Time: 9/14/19 9:00 (this is a Saturday)
Non Working time: TBD

If the non working time equals 5pm Friday to 7am Monday, the above example TBD would equal 16:00 hours
- Calculation is 5pm Friday to 9am Saturday = 16:00 hours

How do I do a formula to return the 16 hours?

Any help would be GREATLY appreciated!
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
If C2 = 'Running" and B2 is between 5pm FRI and 7am MON, then return the HH:MM from B2 to 7:00 MON, otherwise do the current formula
:eek: It is becoming something of a monster but try this. The first line is the working part of the new condition.

=IF(AND(C2="Running",MEDIAN(WEEKDAY(B2,12)+MOD(B2,1),4+17/24,7+7/24)=WEEKDAY(B2,12)+MOD(B2,1)),(7+7/24)-(WEEKDAY(B2,12)+MOD(B2,1)),
MAX(IF(WEEKDAY(B2,2)>5,B2,MIN(B2,INT(B2)-WEEKDAY(B2,3)+7/24))-IF(WEEKDAY(A2,2)>5,A2,MAX(A2,INT(A2)+7-WEEKDAY(A2,16)+17/24)),0))

Don't ask me to explain it. :cool: :outtahere:
 
Upvote 0

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

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