+ Reply to Thread
Results 1 to 7 of 7

elapse time function ( time entered with no colon).

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    Dallas,Tx
    MS-Off Ver
    Excel 2013
    Posts
    9

    elapse time function ( time entered with no colon).

    Hi, Newbie here.

    I have seen some other threads on this, but didn't want to ask in those...

    I have been entering some backup times using 24 hr clock, and manually entering the colon, example:

    B2 22:10 C2 22:50 with results in D2 0:40

    But now I have a project that I will be entering about 100 of these a day ( 24 hour format) And I would like not to have to put in the colon.

    In other threads I found the use of Custom 0\:00 format allows me not to enter the colon. cool/ but I am no longer getting correct results in D2

    A few of these times will go over the midnight mark, so results would have to calculate that also.

    I hope I explained this correctly.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: elapse time function ( time entered with no colon).

    In D2 copied down

    =MOD((LEFT(C2,LEN(C2)-2)&":"&RIGHT(C2,2))-(LEFT(B2,LEN(B2)-2)&":"&RIGHT(B2,2)),1)
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: elapse time function ( time entered with no colon).

    Here's another way (assuming the times are hh:mm, not mm:ss)

    =MOD(TEXT(C2,"00\:00")-TEXT(B2,"00\:00"),1)

  4. #4
    Registered User
    Join Date
    01-29-2014
    Location
    Dallas,Tx
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: elapse time function ( time entered with no colon).

    Quote Originally Posted by ChemistB View Post
    In D2 copied down

    =MOD((LEFT(C2,LEN(C2)-2)&":"&RIGHT(C2,2))-(LEFT(B2,LEN(B2)-2)&":"&RIGHT(B2,2)),1)
    Does that work for you?
    Thanks for the speedy reply.

    It does work, if both times are before midnight. Issue I am having is if say.. Backup starts at 22:00 and ends at 3:00

  5. #5
    Registered User
    Join Date
    01-29-2014
    Location
    Dallas,Tx
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: elapse time function ( time entered with no colon).

    Quote Originally Posted by Jonmo1 View Post
    Here's another way (assuming the times are hh:mm, not mm:ss)

    =MOD(TEXT(C2,"00\:00")-TEXT(B2,"00\:00"),1)
    Thanks, That works.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: elapse time function ( time entered with no colon).

    That works for me even across Midnight. Jonmo's formula is better though.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: elapse time function ( time entered with no colon).

    I also get the same results with both formulas.

    Make sure you have the cell formatted as a time, not number


    Anyway, glad you got it sorted.

+ 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. Replies: 9
    Last Post: 08-09-2013, 12:07 AM
  2. [SOLVED] How to subtract time without entering colon and retain time format?
    By blmholland in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2013, 10:36 PM
  3. Replies: 16
    Last Post: 06-02-2013, 01:42 PM
  4. [SOLVED] time format, if user enters time without colon, insert for them
    By MaddyG in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2013, 06:12 PM

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