+ Reply to Thread
Results 1 to 7 of 7

Formula not calcuating time worked if shift finishes the next day

  1. #1
    Forum Contributor
    Join Date
    11-07-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    126

    Formula not calcuating time worked if shift finishes the next day

    Hi,

    I have come across a problem with a formula I am using, I have shift times that could finish on or after midnight. I have managed to get the shift length calculating correctly but when I am trying to calculate how many people I have across every 15minute interval it is either not calculating at all or not calculating the last interval (depending on if I put 00:00 or 23:59).

    Any help would be appreciated (I have attached an example)

    thanks,
    Attached Files Attached Files

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Formula not calcuating time worked if shift finishes the next day

    =sum((a$3:a$7<=$f1)*((a$3:a$7+c$3:c$7)>$f1)*$d$3:$d$7)

  3. #3
    Valued Forum Contributor
    Join Date
    10-14-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2019
    Posts
    353

    Re: Formula not calcuating time worked if shift finishes the next day

    I left your formulas, but put a different 00:00 and then it worked ok
    Attached Files Attached Files
    Kind regards,
    Piet Bom

  4. #4
    Forum Contributor
    Join Date
    11-07-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    126

    Re: Formula not calcuating time worked if shift finishes the next day

    Hi,

    This works great thanks, the only problem I have is if the time goes over midnight I would need it to calculate into the next day, I have attached an example and what it would look like when counting.
    Attached Files Attached Files

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

    Re: Formula not calcuating time worked if shift finishes the next day

    Try the following modification to the array entered formula*:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Select cell K2,
    Paste the formula into the formula bar,
    Simultaneously press the Ctrl, Shift and Enter keys,
    Double click the fill handle to copy down.
    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.

  6. #6
    Forum Contributor
    Join Date
    11-07-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    126

    Re: Formula not calcuating time worked if shift finishes the next day

    so sorry for the late reply on this, worked perfectly - thank you.

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

    Re: Formula not calcuating time worked if shift finishes the next day

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. 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. Calculating percent of hours worked by shift using military time
    By seanpod in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-24-2015, 01:23 PM
  2. [SOLVED] Time Sheet that calculates hours worked into one of three shift columns
    By mbocian in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-10-2014, 11:27 AM
  3. Excel not calcuating hours worked properly?
    By thejoz in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-05-2012, 02:09 PM
  4. Replies: 0
    Last Post: 05-14-2012, 05:36 PM
  5. Replies: 2
    Last Post: 01-08-2012, 04:28 PM
  6. 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
  7. Replies: 5
    Last Post: 02-19-2009, 01:41 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