+ Reply to Thread
Results 1 to 8 of 8

Difference Between Time based off of a 10 Hour Workday

  1. #1
    Registered User
    Join Date
    09-24-2018
    Location
    Texas
    MS-Off Ver
    365
    Posts
    57

    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.
    Attached Files Attached Files
    Last edited by jclaborn; 01-11-2019 at 10:43 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    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)
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    09-24-2018
    Location
    Texas
    MS-Off Ver
    365
    Posts
    57

    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. #4
    Registered User
    Join Date
    09-24-2018
    Location
    Texas
    MS-Off Ver
    365
    Posts
    57

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

    I think I figured it out.

  5. #5
    Registered User
    Join Date
    09-24-2018
    Location
    Texas
    MS-Off Ver
    365
    Posts
    57

    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..
    Last edited by jclaborn; 01-11-2019 at 10:30 PM.

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    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
    Attached Files Attached Files

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

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

    Is this right?

    O22 and custom format to [h]:mm

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,662

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

    Quote Originally Posted by Sulprobil View Post
    Google for
    [deleted]

    Regards,
    Bernd P
    It is not acceptable to use a post to drive traffic to your own web site.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Difference between two dates based on date and hour
    By cmorten82 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-25-2015, 12:09 PM
  2. get time and date difference based on the hour or minutes given
    By stoey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-05-2013, 03:09 PM
  3. Calculating end date based on 8-hour workday
    By nojamindonut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-27-2013, 07:40 PM
  4. Military/24 Hour Time Adding and difference finding
    By Squirrel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-29-2011, 11:05 PM
  5. Automated Counter + 24 hour Time Difference.
    By all4excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-27-2008, 02:15 PM
  6. [SOLVED] Calculate time difference to the half hour
    By Ken Ivins in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 03:05 PM

Bookmarks

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