How many hours within worked hours

jackied

New Member
Joined
Dec 6, 2022
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
Hello Everyone,

I need help!

Scenario:

I have a 24-hour labor contract that runs approximately 3,500 hours a month.
The invoice gives me everyone's Time In and Time Out with Total Hours worked.

The issue I am facing is that within the hours worked, we are performing an above-standard service to another group which is billable to them.
We have set hours that we provide this 3rd party service.
The above-standard, billable hours are Monday-Friday from 6pm - 8am.
The invoice I receive gives me the backup and is displayed like this:

12/6/22 Joe Smith, Time In: 0:00, Time Out: 6:00, Hours: 6
12/6/22 Jane Smith, Time In: 6:00, Time Out: 14:00, Hours: 8
12/6/22 John Smith, Time In: 6:00, Time Out: 16:00, Hours: 10
12/6/22 Jake Smith, Time In: 14:00, Time Out: 22:00, Hours: 8
12/6/22 Jack Smith, Time In: 16:00, Time Out: 22:00, Hours: 6
12/6/22 Jackie Smith, Time In: 22:00, Time Out: 0:00, Hours: 2

I need a formula that can tell me how many of the hours worked fall within 6pm and 8am.

Please help! and Thank you!!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
2022-12-06_15h20_31.png


Depending where your actual data is you might want to change the address of the cells in the formula
Excel Formula:
=IF(HOUR(C2)>18,24-HOUR(C2), 0)+IF(HOUR(D2)<=8, HOUR(D2), IF(HOUR(D2)>18, HOUR(D2)-18))
 
Upvote 0

Forum statistics

Threads
1,215,676
Messages
6,126,170
Members
449,296
Latest member
tinneytwin

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