# Difference Between Time based off of a 10 Hour Workday

1. ## Difference Between Time based off of a 10 Hour Workday

Hello,

I currently track products that go through our plant with a start time and a end time.. I am trying to have a function that takes the difference between 2 dates and times to tell me how long a item took to get through the plant and outputs the total hours.. But I don't want to track all hours in the day.. Only our work shifts..

Our shifts work 6AM to 4:30PM. We have a 30 minute break from 9:00AM to 9:30AM and another at 12:00PM to 12:30PM

I want to be able to see the difference in time and the total hours it took to build it and output it without counting all the hours in the day, only counting work hours.

2. ## Re: Difference Between Time based off of a 10 Hour Workday

Paste this code in to a macro module

``Please Login or Register  to view this content.``

Then enter this formula into cell H22

=WorkHours(F22:G22)

3. ## Re: Difference Between Time based off of a 10 Hour Workday

Thank you bud.. Im not too familiar with Macro Modules and how to use them. Can you provide me some additional assistance?

4. ## Re: Difference Between Time based off of a 10 Hour Workday

I think I figured it out.

5. ## Re: Difference Between Time based off of a 10 Hour Workday

When I try to count the hours over a span of a few days, it doesn't give me a accurate total number of hours.. So if I started a project at 1/5/19 at 1:00PM and ended the project at 1/9/19 at 1:00PM it outputs zero.. Need it to count total difference in hours but no more then 10 hours per day increments..

6. ## Re: Difference Between Time based off of a 10 Hour Workday

1/5/19 at 1:00PM to 1/9/19 at 1:00PM = 342

7. ## Re: Difference Between Time based off of a 10 Hour Workday

Is this right?

O22 and custom format to [h]:mm

Formula:
`Please Login or Register  to view this content.`

8. ## Re: Difference Between Time based off of a 10 Hour Workday

Originally Posted by Sulprobil
[deleted]

Regards,
Bernd P
It is not acceptable to use a post to drive traffic to your own web site.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1