Worked time between multiple dates

Moose91

New Member
Joined
Aug 4, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello!

I hope someone can help me with this Excel problem.
I have a table of data with multiple columns, one of which holds a time and date entry. Each of these entries is a time that an operator has logged a test result in our system.

What I'd like to do is filter by product (Column A) and figure out the total amount of time they've been working on that product, from the first piece of data entered to the last.
However, the work spans several days and I don't want the result to include any time which is not during working hours.
I do know the shift pattern on each day of the week.

Is there a way to work this out? I've added an image of a simplified example.
I would like to filter by column A to a single product and know the total working hours on the product using column C.

So for example, if I filtered by product 1, that would leave row 16 as the last entry. C16 - C2 would give me the total elapsed time, but a lot of it would be outside shift ours, e.g. after 10pm or before 6am.
Ideally the end goal will be to have this result for ever unique product in the whole data table.

Thanks in advance.

Book1
ABC
1ProductPageData Entry Time
21101/01/22 06:52:00
31101/01/22 06:53:00
41101/01/22 22:47:00
51202/01/22 06:41:00
61202/01/22 14:17:00
71203/01/22 16:53:00
81303/01/22 10:01:00
91405/01/22 11:03:00
101405/01/22 11:03:00
111405/01/22 11:04:00
121405/01/22 22:35:00
131510/01/22 06:35:00
141510/01/22 08:56:00
151511/01/22 12:45:00
161512/01/22 18:46:00
172101/01/22 06:52:00
182101/01/22 06:53:00
192101/01/22 22:47:00
202202/01/22 06:41:00
212202/01/22 14:17:00
222203/01/22 16:53:00
232303/01/22 10:01:00
242405/01/22 11:03:00
252405/01/22 11:03:00
262405/01/22 11:04:00
272405/01/22 22:35:00
282510/01/22 06:35:00
292510/01/22 08:56:00
302511/01/22 12:45:00
312512/01/22 18:46:00
Sheet1
 

Attachments

  • Capture.JPG
    Capture.JPG
    74.7 KB · Views: 13

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hello!

I hope someone can help me with this Excel problem.
I have a table of data with multiple columns, one of which holds a time and date entry. Each of these entries is a time that an operator has logged a test result in our system.

What I'd like to do is filter by product (Column A) and figure out the total amount of time they've been working on that product, from the first piece of data entered to the last.
However, the work spans several days and I don't want the result to include any time which is not during working hours.
I do know the shift pattern on each day of the week.

Is there a way to work this out? I've added an image of a simplified example.
I would like to filter by column A to a single product and know the total working hours on the product using column C.

So for example, if I filtered by product 1, that would leave row 16 as the last entry. C16 - C2 would give me the total elapsed time, but a lot of it would be outside shift ours, e.g. after 10pm or before 6am.
Ideally the end goal will be to have this result for ever unique product in the whole data table.

Thanks in advance.

Book1
ABC
1ProductPageData Entry Time
21101/01/22 06:52:00
31101/01/22 06:53:00
41101/01/22 22:47:00
51202/01/22 06:41:00
61202/01/22 14:17:00
71203/01/22 16:53:00
81303/01/22 10:01:00
91405/01/22 11:03:00
101405/01/22 11:03:00
111405/01/22 11:04:00
121405/01/22 22:35:00
131510/01/22 06:35:00
141510/01/22 08:56:00
151511/01/22 12:45:00
161512/01/22 18:46:00
172101/01/22 06:52:00
182101/01/22 06:53:00
192101/01/22 22:47:00
202202/01/22 06:41:00
212202/01/22 14:17:00
222203/01/22 16:53:00
232303/01/22 10:01:00
242405/01/22 11:03:00
252405/01/22 11:03:00
262405/01/22 11:04:00
272405/01/22 22:35:00
282510/01/22 06:35:00
292510/01/22 08:56:00
302511/01/22 12:45:00
312512/01/22 18:46:00
Sheet1
Just add two helper columns one which has starting working hours and another ending working hours.
Add a third helper column to find if it falls between the two or outside of that.
Then you can filter that data at any place based on the third helper column.

Although it can be done with only 1 helper column too but that shall make formula so difficult to write and understand, particularly if you are not much acquainted.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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