+ Reply to Thread
Results 1 to 4 of 4

Finding range between start times, spanning across midnight

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Finding range between start times, spanning across midnight

    Hi,

    I have various start times for employees.

    I need to find out the total movement in start times per week for the employees.

    I have used MIN and MAX to find the earliest and latest start times, and then a subtraction to find the difference.

    This works brilliantly until my employees who start around midnight.

    If they have started before and after midnight, it takes midnight as the earliest time and 23:00 as the latest, giving a difference of 23 hours instead of 1 hour.

    i.e.

    Start Times
    23:00, 23:15, 00:15, 00:30

    Range of Movement
    00:30 - 23:00 = 01:30

    I've tried, =$B$9+($C$4>$B$9)-$C$4 but this does not work when the MIN reads 00:00.

    Any ideas guys?

    kashflo

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Finding range between start times, spanning across midnight

    Hi
    You need to include the actual date in your source cells and it will then give you the correct time difference.
    Hope this helps.
    Tony

  3. #3
    Registered User
    Join Date
    07-26-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Finding range between start times, spanning across midnight

    Tony,

    Thanks for your response.

    We can't include the date, because the start times are manually keyed in to a spreadsheet.

    kashflo

  4. #4
    Registered User
    Join Date
    08-15-2022
    Location
    Haiti
    MS-Off Ver
    365
    Posts
    6

    Re: Finding range between start times, spanning across midnight

    By range of movement do you mean the number of hours between 2 times. If it is the case try the following :

    Please Login or Register  to view this content.
    It will take care the midnight span ... if you want it in terms of number of hours multiply the above by 24 or utilize the
    Please Login or Register  to view this content.
    function:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Hope that helps

+ 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. Counting the number of occurrences and spanning midnight
    By allwrighty in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-01-2013, 05:53 PM
  2. [SOLVED] Calculatuing Night Differential from start and end times that pass midnight
    By D J in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-16-2013, 11:35 AM
  3. [SOLVED] Count occurrences and sum values with times spanning over midnight.
    By SorZer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-14-2012, 04:12 AM
  4. Time spanning midnight ---- as minutes, not hh:mm
    By Hang Glider in forum Excel General
    Replies: 1
    Last Post: 01-24-2011, 06:07 PM
  5. Hours in gnatt spanning midnight
    By r1ch1nxdcc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-15-2009, 10:22 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