Sumifs Hours Worked Between Two Dates and Times with Multiple Criteria

bradyman97

Board Regular
Joined
Feb 22, 2008
Messages
60
Office Version
  1. 2019
Below is a small sample of my spreadsheet. I'm trying to come up with a formula that adds the total hours worked between two dates, and the times are between 2200 and 0600, and if my code is Overtime 1.5. Formula result should be 16 hours.


(A1) Start Date "01/01/2024"
(A2) End Date "01/04/2024"
(A3) Code Name "Overtime 1.5"
(C1) Total Hours for the Code


DATERATECODESTARTENDTOTAL HOURS
01/01/202433.67Normal Hours14:0022:008.00
01/01/202450.51Overtime 1.522:0006:008.00
01/02/202433.67Normal Hours14:0022:008.00
01/03/202450.51Overtime 1.506:0014:008.00
01/03/202433.67Normal Hours14:0022:008.00
01/04/202433.67Normal Hours14:0022:008.00
01/04/202450.51Overtime 1.522:0006:008.00



Thank you for your time
 
If you convert col D to numbers & expand the number of decimals visible you will see that you have the wrong value
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
If you convert col D to numbers & expand the number of decimals visible you will see that you have the wrong value

How does that happen when i have 22:00 (format Time) in the cell and it says 10:00:00 PM in the formula bar
 
Upvote 0
Time is just a special type of cell format & does not change/affect the actual value in the cell.
 
Upvote 0
Glad it's sorted & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,117
Members
453,021
Latest member
Justyna P

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