+ Reply to Thread
Results 1 to 5 of 5

Subtracting Break Times From Time Sheet

  1. #1
    Registered User
    Join Date
    09-23-2014
    Location
    Detroit, MI
    MS-Off Ver
    office 10
    Posts
    16

    Subtracting Break Times From Time Sheet

    Good morning,

    I am trying to remove break times from a time sheet, but am struggling. I am looking for a way to remove break times from someone's hours. The employees come in at various hours so not all breaks apply to each employee.


    Attached is a sample worksheet. In the employee table, I manually did the calculation to show what it the output should be. I can't find out how I determine what breaks fall into a duration of time.

    Any help is greatly appreciated.

    Thank you
    Attached Files Attached Files

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

    Re: Subtracting Break Times From Time Sheet

    Put this formula in D12 and copy down. (I tried to simplify it by using an array formula but couldn't get that to work. Maybe someone else can do that.)

    This assumes that a particular break applies if and only if the entire range of the break time falls within that employee's working hours. The full length of the break is always used.

    =C12-B12-IF(AND(B12<A$2,B$2<C12),C$2,0)-IF(AND(B12<A$3,B$3<C12),C$3,0)-IF(AND(B12<A$4,B$4<C12),C$4,0)-IF(AND(B12<A$5,B$5<C12),C$5,0)-IF(AND(B12<A$6,B$6<C12),C$6,0)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

    Re: Subtracting Break Times From Time Sheet

    Here's a better one. This goes in D12, copy down.

    =C12-B12-SUMPRODUCT(--(B12<$A$2:$A$6)*--(C12>$B$2:$B$6)*$C$2:$C$6)
    Last edited by 6StringJazzer; 04-03-2017 at 10:48 AM. Reason: correction to formula

  4. #4
    Registered User
    Join Date
    09-23-2014
    Location
    Detroit, MI
    MS-Off Ver
    office 10
    Posts
    16

    Re: Subtracting Break Times From Time Sheet

    Sorry for the delay in response. The issue I am having is if someone starts work at 8:00 PM and leaves after midnight. I was thinking of doing an "if" statement to determine if the in or out is higher. However, this created another issue of not capturing the proper break times. Any ideas on that?

    Thank you for your help.

  5. #5
    Registered User
    Join Date
    09-23-2014
    Location
    Detroit, MI
    MS-Off Ver
    office 10
    Posts
    16

    Re: Subtracting Break Times From Time Sheet

    BumpBump.

    Thank you

+ 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] Subtracting Times with no space between time and AM/PM
    By MR22 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-09-2017, 04:19 PM
  2. Replies: 4
    Last Post: 03-02-2016, 02:46 AM
  3. [SOLVED] Formula needed to display Break and Lunch Times from another sheet
    By playaller in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-20-2013, 12:48 PM
  4. Replies: 0
    Last Post: 11-14-2011, 05:40 PM
  5. subtracting a time from a range of times
    By coatey1 in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 04-24-2010, 03:49 AM
  6. Replies: 4
    Last Post: 01-25-2009, 11:25 AM
  7. [SOLVED] subtracting a break from hours worked
    By truecam in forum Excel General
    Replies: 2
    Last Post: 08-18-2005, 09: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