Common hours between schedules

Donager

New Member
Joined
Mar 28, 2015
Messages
17
I am working on a formula to identify the amount of time an employee is scheduled with their supervisor. I have converted all start and end times to numbers. For example, 1pm-10pm will be 1300-2200. The start and end time is in a separate cell.

The supervisors are setup the same. with a day over day schedule and start times.

I am working on a formula to identify if the employees schedule range is within the supervisors range, and how much.

If the employee works 1300-2200 and the supervisor works 0500-1700, I want the formula to identify how much time they share.

I converted to numbers instead of times because it is easier.

I have tried nesting various if statements and using if/and but I am not getting there yet.

Thanks for the help.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]emp_start[/TD]
[TD]emp_end[/TD]
[TD]emp_hours[/TD]
[TD][/TD]
[TD]sup_start[/TD]
[TD]sup_end[/TD]
[TD]sup_hours[/TD]
[TD][/TD]
[TD]shared_hours[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]1300[/TD]
[TD]1800[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]0500[/TD]
[TD]1700[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]

From what i understand this is kinda what you are looking for (please correct me if im wrong)

Where the employee was working from 1pm - 6pm and the super was from 5am-5pm so they both shared working time from 1pm-5pm which is 4 hours

correct?

What you need is the formula for cell B9 in this example ?
 
Last edited:
Upvote 0
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]emp_start[/TD]
[TD]emp_end[/TD]
[TD]emp_hours[/TD]
[TD][/TD]
[TD]sup_start[/TD]
[TD]sup_end[/TD]
[TD]sup_hours[/TD]
[TD][/TD]
[TD]shared_hours[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]1300[/TD]
[TD]1800[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]0500[/TD]
[TD]1700[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]

From what i understand this is kinda what you are looking for (please correct me if im wrong)

Where the employee was working from 1pm - 6pm and the super was from 5am-5pm so they both shared working time from 1pm-5pm which is 4 hours

correct?

What you need is the formula for cell B9 in this example ?

That is exactly what I am looking for. Thank you
 
Upvote 0
I sorted this out and no longer need assistance. It was a nested if/and statement. I'll post the formula as soon as I get it cleaned up for posting.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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