+ Reply to Thread
Results 1 to 13 of 13

Making Time roll over after 24 hours

Hybrid View

  1. #1
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Making Time roll over after 24 hours

    Take a look at attached sample ...
    Let me know if it is OK ...

    HTH
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-25-2009
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Making Time roll over after 24 hours

    Works like a charm. You help is very much appreciated! I spent a long time trying to figure this out to no avail & now very glad I posted. It would have taken me quite some to find that fix.

    Issue solved.

    Thank you very much!

    Best wishes,
    Emil240

    (Emil240 shares some cookies and brownies as a thank you gift)

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Making Time roll over after 24 hours

    To clarify why Jean Rage's will work and yours did not...

    TIME in XL is Decimal, eg noon = 0.5, 6 am = 0.25 and 6pm = 0.75

    The above is important to note because the TIME function will only work with the decimal time value (ie complete days (integer) will be ignored)... to quote XL Help:

    TIME FUNCTION

    Returns the decimal number for a particular time

    The decimal number returned by TIME is a value ranging from 0 (zero) to 0.99999999, representing the times from 0:00:00 (12:00:00 AM) to 23:59:59 (11:59:59 P.M.).
    So to elaborate with ex. - if D2 is say 360 then both

    =TIME(0,D2,0)

    and

    =D2/1440

    will return 0 06:00
    ie 360 minutes is 06:00 hours - in decimal terms 0.25

    However if D2 were say 1800 then

    =TIME(0,D2,0)

    would still return 0 06:00

    whereas

    =D2/1440

    would return 1 01:00

    This is because TIME will only work with decimal remainder... the value of 1800 minutes is in XL terms 1.25 - 1 and a quarter days... TIME will use only the .25 in it's calculation thus returning just 0 06:00. The D2/1440 approach will not disregard the complete days.

+ 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