+ Reply to Thread
Results 1 to 6 of 6

Time worked after midnight

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Time worked after midnight

    This is a variation of my earlier post:-

    http://www.excelforum.com/excel-gene...tain-time.html

    I now need the hours worked after midnight - assuming the shift finishes the next day. See the attached sheet for examples and expected answers. thanks

    regards

    Kaps
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Time worked after midnight

    Hi, Maybe
    Please Login or Register  to view this content.
    Formatted as [hh]:mm

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Time worked after midnight

    I think your last example should have a start date of 24th March for the desired result, and you can achieve it using this formula in E3:

    =(C3-B3)*(INT(C3)>INT(B3))

    and copying down.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    04-24-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Time worked after midnight

    Thanks. Pete you are correct in spotting my typo.

    However neither of your formulae give the correct result - when I type in 23/03/2012 20:00 and 23/03/2012 23:50 - I get 23:50 rather than zero. Any ideas what I am doing wrong ?

    kind regards

    Kaps

  5. #5
    Registered User
    Join Date
    04-24-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Time worked after midnight

    sorry - ignore last post - I was being an idiot - found the error.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Time worked after midnight

    Okay, please mark the thread as Solved (the FAQ shows you how). Also, you can click on the "star" icon in the bottom left corner of any post that has helped you, in order to pass on thanks directly.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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