+ Reply to Thread
Results 1 to 11 of 11

Timesheet calculations

  1. #1
    Registered User
    Join Date
    01-24-2020
    Location
    Sofia, Bulgaria
    MS-Off Ver
    18.1910.1283.0
    Posts
    6

    Timesheet calculations

    Hi, I am using Excel for scheduling my stuff and need a special rule which I can't set properly. I believe it will be possible to set it on Excel as it is just a calculation, but don't know how to do it. I have a list with all shifts of an employee for the week and need to check if he had 36 break ( time frame where he has no scheduled hours). I have the starting and the end times of each shift. Can you help me to make this formula, thanks. On the attached file you can see a sample schedule for one person.
    Attached Files Attached Files
    Last edited by monty_gl; 01-24-2020 at 09:02 AM.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Timesheet calculations

    can you provide more detail?

    do you meant they must have at least one 36 hour interval between their various shifts, or that they must have at least 36 hour gap in total, or something else entirely?

    based on your sample file you seem to have 4 gaps, given 5 shifts, and these would equate to gaps of: 23:30; 30:15; 18:00; 22:45

    do you agree with the above and, if so, is this a fail?

    formula wise, the below would, for ex., derive the 30:15 as max gap between shifts - but it's a little 'hardwired', and not clear if this is what you need...

    =MAX(INDEX((C3:C6+H3:H6)-(C2:C5+(I2:I5<H2:H5)+I2:I5);0))

  3. #3
    Registered User
    Join Date
    01-24-2020
    Location
    Sofia, Bulgaria
    MS-Off Ver
    18.1910.1283.0
    Posts
    6

    Re: Timesheet calculations

    Yes, exactly. They must have at least one 36 hour interval between their various shifts, not 36 hours in total. I need a formula with which I can check if the employee has this 36 break once the schedule is ready. Yes, on the sample I attached there is no such break on purpose.

  4. #4
    Registered User
    Join Date
    01-24-2020
    Location
    Sofia, Bulgaria
    MS-Off Ver
    18.1910.1283.0
    Posts
    6

    Re: Timesheet calculations

    Hey Xlent I just tried to reproduce your formula on the sample but seems it is not working properly. Excel says there is no formula and doesn't make any calculations. Any ideas? Attachment 659426

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Timesheet calculations

    refer attached - highlighted cell simply returning max gap between shifts listed, based on sample data.

    in reality you may have more scenarios to account for, and varying number of shifts etc - so you may need to post back with a more detailed sample, along with the expected results.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-24-2020
    Location
    Sofia, Bulgaria
    MS-Off Ver
    18.1910.1283.0
    Posts
    6

    Re: Timesheet calculations

    Thank you, XLent! I will take a look into the file and hopefully will get the logic. Next week I will have a sample with more employees and will get back to you. One more question, do you know what I can use to see the gap between the shifts? For example I want to see that the gap between the end time of the shift on 21st and the start time of the shift on 23rd is 18:00 hours, then the gap between the end time of the shift on 23rd and the start time of the shift on 24th etc.

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

    Re: Timesheet calculations

    To see the individual gaps paste the following into a cell in row 3 and drag down the column to row 6: =SUM(C3,H3)-SUM(C2,I2<H2,I2)
    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.

  8. #8
    Registered User
    Join Date
    01-24-2020
    Location
    Sofia, Bulgaria
    MS-Off Ver
    18.1910.1283.0
    Posts
    6

    Re: Timesheet calculations

    Thanks for the update, JeteMc! I tried to use your formula but it seems it doesn't work properly. It doesn't calculate the gap properly, only showing strange numbers. For example the gap between the first two shifts is 0.98 etc. I tried to format the cell but no success.

  9. #9
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Timesheet calculations

    in XL time is decimal - i.e. 1 = 24 hours, and 0.5 = 12 hours

    given your potential results exceed 24 hours apply a custom format of [hh]:mm

  10. #10
    Registered User
    Join Date
    01-24-2020
    Location
    Sofia, Bulgaria
    MS-Off Ver
    18.1910.1283.0
    Posts
    6

    Re: Timesheet calculations

    I've got it, thanks.

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

    Re: Timesheet calculations

    Thank You for the feedback. If the issue is resolved, please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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] Time sheet calculations (hours, minutes, summary by payroll time type)
    By robinc1969 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-09-2018, 05:31 AM
  2. [SOLVED] Time Calculations for a Schedule of Jobs
    By leo73pk in forum Excel General
    Replies: 1
    Last Post: 01-10-2017, 12:26 PM
  3. Time Sheet Calculations with IIF
    By mebs60 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-14-2012, 06:15 PM
  4. Time Sheet Schedule
    By manickmj1 in forum Excel General
    Replies: 6
    Last Post: 11-23-2009, 11:51 PM
  5. [SOLVED] Time sheet calculations
    By [email protected] in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-09-2006, 04:19 PM
  6. time sheet calculations
    By emmcee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  7. time sheet calculations
    By emmcee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 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