Time intersect

PATSYS

Well-known Member
Joined
Mar 12, 2006
Messages
1,750
Hi all,

Is there a way to get the number of hours intersected by 2 time periods?

For example:

09:00 to 18:00 vs 21:00 to 06:00 = 0 hr (no intersection)
18:00 to 03:00 vs 21:00 to 06:00 = 5 hrs (this is from 22:00-03:00)
00:00 to 09:00 vs 21:00 to 06:00 = 6 hrs (this is from 00:00-06:00)
05:00 to 14:00 vs 21:00 to 06:00 = 1 hrs (this is from 05:00-06:00)

Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Need also the dates involved because :
If this is no intersection : 09:00 to 18:00 vs 21:00 to 06:00 = 0 hr (no intersection)
Why is this not also no intersection :
05:00 to 14:00 vs 21:00 to 06:00 = 1 hrs (this is from 05:00-06:00)
 
Upvote 0
Need also the dates involved because :
If this is no intersection : 09:00 to 18:00 vs 21:00 to 06:00 = 0 hr (no intersection)
Why is this not also no intersection :
05:00 to 14:00 vs 21:00 to 06:00 = 1 hrs (this is from 05:00-06:00)

It is a workshift, so date is not part of it.

Any workshift that touches on 21:00 to 06:00 gets some premium pay.
 
Upvote 0
So should this be 6 hours? :
18:00 to 03:00 vs 21:00 to 06:00 = 5 hrs
 
Upvote 0

Forum statistics

Threads
1,226,112
Messages
6,189,039
Members
453,521
Latest member
Chris_Hed

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