+ Reply to Thread
Results 1 to 8 of 8

Deficit and Over hours for Shift Adherence

  1. #1
    Registered User
    Join Date
    09-07-2021
    Location
    Poland
    MS-Off Ver
    MS 365
    Posts
    4

    Deficit and Over hours for Shift Adherence

    Hi guys, how are you?

    I would like to ask for some help to put in practice an if formula from excel.

    I have to send daily a shift adherence from some analysts and we have different shifts and also buffer addition for 5 minutes late and 5 minutes overtime.

    12:00:00 - 21:00:00
    13:00:00 - 22:00:00
    14:00:00 - 23:00:00




    Deficit: He has a logging buffer for 5 minutes, meaning that the logging stamp has to be until 12:05:00 and after that start to count deficit time.
    Also if he logs out earlier from his shift this is calculated in his deficit time.

    Overtime: Would show the time after 21:05:00


    For example.
    This analyst works from 12:00:00 until 21:00:00

    Screenshot 2021-09-07 at 12.37.26.png

    Today he arrived late at 12:25:00, so already subtracting the agreed buffer of 5 minutes, he has a deficit of 20 minutes.
    He worked overtime 21:37:00,s so already subtracting the agreed buffer of 5 minutes, he has 32 minutes overtime.

    I would like to have some assistance to put a formulation inside of Deficit and over time, subtracting the buffer, because I'm doing this manually, and is consuming a lot of time.

    The idea is to provide weekly to the management team how many analysts are having deficit time and overtime, not approved.

    Thank you

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,534

    Re: Deficit and Over hours for Shift Adherence

    Hello hemerson and Welcome to Excel Forum.
    Please utilize the information in the "HOW TO ATTACH YOUR SAMPLE WORKBOOK" banner at the top of the page so that we will have a spreadsheet with which to test our proposed formulas/code.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Deficit and Over hours for Shift Adherence

    normally, when time exceeds the buffer then the entire late time is deducted, not just the portion after the buffer, otherwise, from a management perspective, arriving late every day will not be controllable. and if someone is late by 25 minutes they do not loose 25 minutes of standard time and gain 32 minutes of overtime because they havent completed the 8 hours of standard time which is expected before getting overtime... again from management perspective staff would just arrive an hour late and finish an hour late and get paid more.. therefore making their own working hours.

    in the case you have given, the analyst would only get 12 minutes of overtime, and a warning for being late.
    Last edited by janmorris; 09-08-2021 at 07:35 PM.

  4. #4
    Registered User
    Join Date
    09-07-2021
    Location
    Poland
    MS-Off Ver
    MS 365
    Posts
    4

    Re: Deficit and Over hours for Shift Adherence

    Let me see if I can upload the file.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-07-2021
    Location
    Poland
    MS-Off Ver
    MS 365
    Posts
    4

    Re: Deficit and Over hours for Shift Adherence

    Hi Jan,

    Thank you for replying.
    That totally makes sense and I will share the info with the management

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,534

    Re: Deficit and Over hours for Shift Adherence

    Try the following:
    1. For cell E2: =SUM(MAX(0,A2-J1),MAX(0,L1-B2))
    2. For cell F2*: =MAX(0,B2-K1)
    * This will prevent cell F2 from displaying a negative number if logout was before 21:00
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    09-07-2021
    Location
    Poland
    MS-Off Ver
    MS 365
    Posts
    4

    Re: Deficit and Over hours for Shift Adherence

    OMG <3 THANK YOU VERY MUCH.
    I wasn´t thinking about using it this way I was stuck with IF.
    That's awesome.

    One more question Jete, As mentioned above by Jan, I think what was said make totally sense, if the time pass through 12:05, the 5 minutes buffer should be ignored and summed in the time as well.

    How does that could be implemented on here =SUM(MAX(0,A2-J1),MAX(0,L1-B2))

    I added another collum with 00:05:00 and added it to your formula =SUM(MAX(0;A2-J1);MAX(0;L1-B2)+M1)

    Do you think that would be OK?

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,534

    Re: Deficit and Over hours for Shift Adherence

    I feel that the following will work: =SUM(MAX(0,A2-J1+(A2>J1)*M1),MAX(0,L1-B2))
    I tested with 12:00, 12:05 and 12:15 and it seems that the formula is yielding the results you want.
    Let us know if you have any questions.

+ 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. Replies: 1
    Last Post: 07-13-2019, 01:12 PM
  2. Man Hours - Theoretical, Actual and Deficit
    By Phill.Gould in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-10-2018, 08:21 AM
  3. Shift Pattern Adding Hours based on Shift etc
    By fgbuk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2016, 07:56 PM
  4. Break Adherence Report not matching for Night shift agents as date is over lapping
    By KARTHICKNAIDU in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2016, 02:10 PM
  5. [SOLVED] Spliting Day Shift and Night Shift Hours
    By Goldbadger2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2013, 01:16 AM
  6. Replies: 4
    Last Post: 09-21-2012, 12:58 AM
  7. Calculating Hours Worked from Shift Begin and Shift End
    By lukeflegg in forum Excel General
    Replies: 5
    Last Post: 08-12-2011, 03:25 PM

Tags for this Thread

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