+ Reply to Thread
Results 1 to 5 of 5

Time formats

Hybrid View

  1. #1
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Time formats

    I think I understand what you want to do....

    You would prefer to enter times (hours and minutes) with a decimal separator, instead of a colon.

    So 15.45 would mean 3:45 PM

    If that's true, try something like this:
    A1: start time....eg 11 (meaning 11 AM)
    B1: end time.....eg 15.45 (meaning 3:45 PM)

    This formula calculates the difference, in hours and minutes, between those 2 times
    C1: =MOD(DOLLARDE(B1,60)-DOLLARDE(A1,60),24)/24
    Format that cell as time (hrs:mm)

    In the above example, the formula returns: 4:45

    Here are some other examples:
    Start       End         Elapsed
     9.00       11.00       2:00
    23.00        2.30       3:30
    16.00       19.25       3:25
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

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

    Re: Time formats

    Ah, good spot Ron - I missed that completely

    On that basis - another alternative would be:

    =MOD(SUBSTITUTE(TEXT(B1,"0.00"),".",":")-SUBSTITUTE(TEXT(A1,"0.00"),".",":"),1)
    useful perhaps should you wish to use pre XL2007 and avoid ATP dependency.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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