+ Reply to Thread
Results 1 to 5 of 5

Timehseet issues.

  1. #1
    Registered User
    Join Date
    09-26-2019
    Location
    England
    MS-Off Ver
    Not Sure
    Posts
    1

    Timehseet issues.

    I'm having a nightmare. I have column D with a start time and column E with a finish time. I need column G to calculate if the employee worked during the hours of 20:00-06:00.

    I need the amount of hours to show. I just cant figure it out.

    Start Time Finish Time Total Hours Total Night Hours
    10:00:00 22:00:00 12:00:00 08:00:00
    0
    08:30:00 22:00:00 13:30:00
    0
    0
    0
    0

  2. #2
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: Timehseet issues.

    You will find everything you need in here using these formulas.

    (Where 1/12 & 1/3 need to be changed to match different shift start / end times if required.)
    Day Shift Formula: =IF(C2>B2,IF(MOD(C2+1/12,1)<=1/3,0,MIN(0.5833,C2)-IF(C2<=0.25,B2,MAX(B2,0.25))),MAX(0,0.5833-MAX(0.25,B2))+MAX(0,C2-0.25))*24
    (Where 0.5833 and 0.25 are excel times for 2pm & 6am respectively, they may be changed to match different shift start / end times if required.)
    Afternoon Shift Formula > =(B2>C2)*MEDIAN(0,C2-0.5833,0.5833)+MAX(0,MIN(1.20833,C2+(B2>C2))-MAX(0.5833,B2))*24
    Night Shift Formula > =IF(C2<B2,(1+C2-B2)*24,(C2-B2)*24)-(D2+E2)

    The worksheet will explain it far better than I could put words to.
    Attached Files Attached Files
    Uploading an attachment will assist Forum Members in finding the correct Solution for you. Create a dummy worksheet if necessary, add your start data and show where / what your expected results should be. TO ADD A FILE:

    Go to 'Advanced. click on 'Manage Attachments. Select 'Browse & Choose your file, Select 'Upload and then close the Attachment window.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Timehseet issues.

    Hi

    With Start time in A2, Finish time in B2

    C2 Total Hours is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    D2 Night Hours:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    01-08-2018
    Location
    Minneapolis, MN
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Timehseet issues.

    Removing post to comply with forum rules. Thank you for letting me know.
    Last edited by jhamm2018; 09-30-2019 at 01:44 PM. Reason: Removing post to comply with forum rules

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Timehseet issues.

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. RGB Issues
    By harrisj_ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2016, 03:20 AM
  2. Excel to Outlook Calendar date duplication issues and blank cells causing issues
    By singerbatfink in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2016, 08:07 AM
  3. [SOLVED] Excel to Outlook Calendar date duplication issues and blank cells causing issues
    By singerbatfink in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 02-11-2016, 07:57 AM
  4. Replies: 3
    Last Post: 07-16-2014, 01:50 AM
  5. Data Validation List Issues/Sorting Issues
    By taylorbe in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2014, 09:53 AM
  6. Need help please! on timehseet spreadsheet
    By JonathanVR in forum Excel General
    Replies: 0
    Last Post: 08-07-2012, 07:04 AM
  7. IF issues
    By Dbeethekidd in forum Excel General
    Replies: 2
    Last Post: 03-11-2011, 08:22 AM

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