+ Reply to Thread
Results 1 to 5 of 5

Hours After Midnight

  1. #1
    Registered User
    Join Date
    01-05-2017
    Location
    australia
    MS-Off Ver
    2010
    Posts
    3

    Hours After Midnight

    Hey Guys,

    I reckon the answer to this is right under my nose... can't put my finger on it.

    I’m trying to the amount of hours worked on a shift AFTER midnight.

    For Example:

    If someone starts at 16:00 then clocks off at 3:00 then 3hrs have been worked after midnight. If someone starts at 16:00 then clocks off at 22:00 then 0 hrs have been worked after midnight.

    I also then need to calculate the flip side… hours worked before midnight (technically this can just be total shift length - hours worked after midnight.

    Been trying a MOD formula but when someone starts at 22:00 I get the result 22… so that option isn’t working.

    Any help is greatly appreciated

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,975

    Re: Hours After Midnight

    deleted, mis-read problem
    Last edited by protonLeah; 01-06-2017 at 01:14 AM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    01-05-2017
    Location
    australia
    MS-Off Ver
    2010
    Posts
    3

    Re: Hours After Midnight

    Quote Originally Posted by protonLeah View Post
    (End time + 24 * (end time < start time)) - start time

    (03:00 + 24*(03:00<16:00))-16:00 = 11

    Untitled.jpg

    This is an example of the result i'm looking for

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,188

    Re: Hours After Midnight

    Try:

    End time * 24 * (end time < start time)

  5. #5
    Registered User
    Join Date
    01-05-2017
    Location
    australia
    MS-Off Ver
    2010
    Posts
    3

    Re: Hours After Midnight

    Quote Originally Posted by Phuocam View Post
    Try:

    End time * 24 * (end time < start time)
    Thank's heaps mate... this has done the trick!

+ 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. How to calculate hours when it goes after midnight.
    By gps08 in forum Excel General
    Replies: 13
    Last Post: 06-21-2014, 04:19 PM
  2. Replies: 1
    Last Post: 06-03-2014, 06:28 PM
  3. Hours after midnight
    By maniootek in forum Excel General
    Replies: 12
    Last Post: 01-11-2014, 02:44 PM
  4. [SOLVED] Calculating hours worked beyond midnight
    By Boville in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-25-2012, 12:22 PM
  5. Calculating hours with midnight as a start time
    By MarcLiq in forum Excel General
    Replies: 4
    Last Post: 10-01-2009, 07:48 PM
  6. Hours in gnatt spanning midnight
    By r1ch1nxdcc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-15-2009, 10:22 AM
  7. count hours past midnight
    By cojast in forum Excel General
    Replies: 3
    Last Post: 07-01-2008, 03:53 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