+ Reply to Thread
Results 1 to 6 of 6

Calculating Rest Times Over 2 Days

  1. #1
    Registered User
    Join Date
    03-12-2017
    Location
    BATH UK
    MS-Off Ver
    2016
    Posts
    6

    Calculating Rest Times Over 2 Days

    I need to calculate my rest time between work,

    I finish work say at 19:32:00 on one day and start again at 08:18:00 the next day or maybe 2 day later

    How do I work out my rest period ? only need hours and min, seconds not needed

    Thanks in advance

    G

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Calculating Rest Times Over 2 Days

    Will the date be stored in the same cell as the time, or in a separate cell?

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    03-12-2017
    Location
    BATH UK
    MS-Off Ver
    2016
    Posts
    6

    Re: Calculating Rest Times Over 2 Days

    Hi, i think think is working ? file called time, I have put explanations instead of formulas
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Calculating Rest Times Over 2 Days

    Your sample differs from Post 1. In Post 1 you stated that there could be several rest days. In your sample, every day had some entries. This works with your sample, but possibly not with your real data.

    =IF(B5="","",MOD(B5-D3,1))

    in H5, copied down.

  5. #5
    Registered User
    Join Date
    03-12-2017
    Location
    BATH UK
    MS-Off Ver
    2016
    Posts
    6

    Re: Calculating Rest Times Over 2 Days

    That seems to work, thank you very much, can you explain how it works, hate not knowing

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Calculating Rest Times Over 2 Days

    It simply subtracts the two times (which Excel thinks of as numbers). If the time period crosses midnight a negative number is returned. So end (06:00) - start (20:00) = 0.25-0.916666 = -0.66666. MOD retursn the remainder following division by 1 = 0.66666. Excel divides that by 24 (hrs in a day) to return 8 hrs. Your answer.

    If the time period does not cross midnight: end (14:00) - start(06:00) = 0.58333 - 0.25 = 0.3333. The remainder, following division by 1 is still 0.3333 = 8 hrs.

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. [SOLVED] formula to write the dates of rest days for every employee in one cell
    By leprince2007 in forum Excel Formulas & Functions
    Replies: 41
    Last Post: 01-14-2018, 06:14 PM
  2. VLOOKUP Formula not calculating when copied down the rest of the column
    By Blake Williams in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-08-2017, 06:30 AM
  3. Write rest days for all year
    By leprince2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2017, 03:33 PM
  4. Replies: 6
    Last Post: 02-19-2017, 09:28 AM
  5. [SOLVED] Averaging the earliest start times and latest end times for multiple days
    By kbiro in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-26-2016, 02:15 PM
  6. Rest of the days
    By Rashidul in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-25-2013, 10:00 PM
  7. calculating rest value by depreciation
    By Mx7733 in forum Excel General
    Replies: 1
    Last Post: 11-07-2008, 08:57 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