+ Reply to Thread
Results 1 to 5 of 5

Time calculation not working past midnight

  1. #1
    Registered User
    Join Date
    09-14-2011
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    65

    Time calculation not working past midnight

    Hi,

    I am working in UK, calling customers in the US so need to calculate the time in the US.

    I have a column with the time here now and then for each US state I have the number of hours behind GMT and then the time here minus the number of hours to get the US time.

    This was working nicely until about half an hour ago when it went past midnight here, now I am getting #NUM! error. What can I do to fix it please?

    I sense there may be a joke in here somewhere to do with turning into a pumpkin

    Thanks

    Soph

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Time calculation not working past midnight

    well it would help if you actually told us the formula you are using!
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    09-14-2011
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    65

    Re: Time calculation not working past midnight

    sorry it's late!...

    I have hours behind GMT as a number in column C, then in column D I have =TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW())). Then in column E I have =TIME(HOUR($D2)-C2,MINUTE($D2),SECOND($D2))

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Time calculation not working past midnight

    Simpler to use this formula in D2

    =NOW()-TODAY()

    then use this formula in E2

    =MOD(D2-C2/24,1)

    format both cells in required time format

    ......or if you want to stick with your current setup you can just add 24 to the HOUR part in the TIME function, e.g.

    =TIME(HOUR($D2)-C2+24,MINUTE($D2),SECOND($D2))
    Last edited by daddylonglegs; 01-07-2014 at 09:03 PM.
    Audere est facere

  5. #5
    Registered User
    Join Date
    09-14-2011
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    65

    Re: Time calculation not working past midnight

    That's great, thanks!

+ 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. [SOLVED] VLookup to return value for time hh:mm not working past midnight
    By RayRay248 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-25-2021, 06:05 AM
  2. [SOLVED] Calculating time that goes past Midnight
    By jonvanwyk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2013, 04:14 PM
  3. Replies: 4
    Last Post: 01-11-2012, 07:59 PM
  4. Calculate time which is past midnight
    By stoey in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-25-2011, 12:11 PM
  5. [SOLVED] Calculating Time Past Midnight
    By Darren in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-13-2006, 11:03 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