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
 
You can upload it to a share site such as OneDrive, GoogleDrive mark for sharing & then post the link you are given here.
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Here copy of my workbook. Go to tab sheet1

 
Upvote 0
Here is a copy of my workbook. It's under tab sheet1

 
Upvote 0
Both those links are asking me to sign in. You need to mark it for sharing & then post that link you are given.
 
Upvote 0
Try this one

 
Upvote 0
If you change the start date in H2 to 12/11/2022 and H3 to 1/7/2023 it gives the result of 16 and the correct result should be 64
 
Upvote 0
Thanks for that, but there is nothing in col C of Timesheet that has "overtime 1.5". Hence you get 0
 
Upvote 0
There is only one row on that sheet that appears to match the criteria, which is row 45 but the time is not exactly 22:00:00.
It is 0.916666666664241 rater than 0.916666666666667
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,976
Members
449,095
Latest member
Mr Hughes

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