+ Reply to Thread
Results 1 to 4 of 4

Correct Calculation of a Time Sheet - Multiple Conditions

  1. #1
    Registered User
    Join Date
    12-02-2016
    Location
    Stockholm
    MS-Off Ver
    2019
    Posts
    27

    Correct Calculation of a Time Sheet - Multiple Conditions

    Hi all,

    I'm trying to sort a time sheet to calculate the true time I have spent on my assignment, in accordance with the rules the company has set.
    The company sees the hours as 60/10, so in 6 minute intervals where the calculation is negative of course. I.e 15:00 is 15:00 until it is equal to or more than 15:06. There is also a lunch break of 42 minutes per day.
    In my example I have managed to resolve all but 6 minute factor and also how to resolve double input, I.e splitting the work day in 2 shifts with the time in between minus the 42 minutes.

    Any help on how to resolve this would be greatly appreciated.

    Regards

    Fred
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Correct Calculation of a Time Sheet - Multiple Conditions

    I came up with a couple of formulas: (Note: the Lunch Break got pushed out to cell I2 because I added columns.)

    =MROUND((C2-B2)-$I$2,6/1440) - this rounds the result to the nearest 6 minutes. (There are 1440 minutes in a day).

    =HOUR(D2)/24 + 6*INT(MINUTE(D2)/6)/1440 - this rounds down to the end of the last 6 minute increment.

    =HOUR((C2-B2)-$I$2)/24 + 6*INT(MINUTE((C2-B2)-$I$2)/6)/1440 - this is the same formula as above, but with the formulas for D2 substituted in where D2 appears.

    As for the two shifts this might be accomplished by a pivot table. Let me "play" with that idea for a while
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Correct Calculation of a Time Sheet - Multiple Conditions

    Well, that turned out to be easier than I thought it would be.

    Use whatever formula is appropriate to compute the actual time, but leave out subtracting the break.

    I converted the data range to an Excel Table - Excel Tables have a couple of advantages. One of them is that formulas copy down automatically. So when you enter a date in Cell A6, row A6 becomes part of the table and the formula in column E is copied to Cell E6 automatically. Also tables know how many rows they have, so pivot tables, formulas, charts, etc. that are built from them change when the table changes.

    The pivot table was made with the date in the rows column and the Actual time and a calculates fieldas the values (I showed actual time only as a check for the calculation). I relabeled the column headers. Thealculated field in the pivot table to calculate the Time w/Break is ='Actual Time'-42/1440.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-02-2016
    Location
    Stockholm
    MS-Off Ver
    2019
    Posts
    27

    Re: Correct Calculation of a Time Sheet - Multiple Conditions

    It works like a charm! Thanks for the great tips and explanations.

+ 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. Calculating Time sheet with multiple conditions
    By rprice in forum Excel General
    Replies: 10
    Last Post: 10-19-2015, 01:59 AM
  2. IF formula not getting correct result from multiple conditions
    By markusvirus in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2015, 01:36 PM
  3. Calculation based on multiple conditions
    By doop4204 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-22-2015, 02:02 PM
  4. [SOLVED] Please help correct my formula which contains multiple conditions.
    By dmejia174 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-07-2013, 05:09 PM
  5. aging calculation with multiple conditions
    By aws816 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-10-2012, 04:38 AM
  6. Macro for checking multiple conditions & selecting the correct range
    By ashwin_pr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2007, 09:53 PM
  7. [SOLVED] 'Correct' way for multiple calculation from other worksheets?
    By Pheasant Plucker® in forum Excel General
    Replies: 1
    Last Post: 01-24-2006, 05:24 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