+ Reply to Thread
Results 1 to 16 of 16

Excel 2007 : Converting "mm min ss s" time format to "hh:mm:ss"

  1. #1
    Registered User
    Join Date
    04-12-2010
    Location
    *
    MS-Off Ver
    Excel 2007
    Posts
    25

    Converting "mm min ss s" time format to "hh:mm:ss"

    Hi,
    Hope you guys can help.

    I have the following data:
    18 min 56 s
    15 min 52 s
    14 min 50 s

    Is there a way to convert it to:
    00:18:56
    00:15:52
    00:14:50
    ?

    Thanks!
    David

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Assuming your value is stored in cell I9, try

    ="00:"&LEFT(I9,2)&":"&MID(I9,8,2)

  3. #3
    Registered User
    Join Date
    04-12-2010
    Location
    *
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Thanks so much, that worked!

    Unfortunately, I just realized I have some cells with time formats that don't fit to this formula.

    For example:
    8 s
    13 s
    1 min 22 s

    Converts to:
    00:8 :
    00:13:
    00:1 :2

    Is there a way to fit these to the "hh:mm:ss" format too?

    Thanks so much again!
    David

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    How about hours?

  5. #5
    Registered User
    Join Date
    04-12-2010
    Location
    *
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Do you mean if I have cells that contain more than 59 minutes?
    If so, no.

    Here are some examples of the data I have:
    18 min 56 s
    19 min 3 s
    14 s
    1 min 22 s
    1 min 0 s

    Thanks,
    David

  6. #6
    Registered User
    Join Date
    04-12-2010
    Location
    *
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Please help?

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Maybe
    ="00:"&IF(COUNTIF(B4,"*m*"),TEXT(TRIM(LEFT(B4,2)),"00"),"00")&":"&TEXT(TRIM(SUBSTITUTE(RIGHT(B4,4)," s","")),"00")

    EDIT: slightly shorter version
    ="00:"&IF(LEN(B4)>4,TEXT(TRIM(LEFT(B4,2)),"00"),"00")&":"&TEXT(TRIM(SUBSTITUTE(RIGHT(B4,4)," s","")),"00")

    EDIT: even shorter version
    =TIME(0,IF(LEN(B4)>4,TRIM(LEFT(B4,2)),0),TRIM(LEFT(RIGHT(B4,4),2)))
    format cell as hh:mm:ss
    Last edited by Cutter; 04-23-2012 at 06:47 AM. Reason: Added third version

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    -- Deleted --
    Last edited by shg; 04-22-2012 at 07:23 PM.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    @shg
    That's not working - check the 3rd entry in the examples you give - "14 s" yields 0:14:00 but should be 00:00:14

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Thanks, Cutter -- when I fixed it it was more complicated than yours.

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Hey - does that mean I get a 'star tap' from a master????????

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Indeed, and done.

  13. #13
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Hey, thanks for that. I was kidding, but no take-backs! I'm off to the framing shop.

    But I came up with a shorter version:
    =TIME(0,IF(LEN(B4)>4,TRIM(LEFT(B4,2)),0),TRIM(LEFT(RIGHT(B4,4),2)))
    format cell as hh:mm:ss

    EDIT: and even shorter
    =TIME(0,TRIM(LEFT(B4,2))*(LEN(B4)>4),TRIM(LEFT(RIGHT(B4,4),2)))
    Last edited by Cutter; 04-23-2012 at 07:00 AM. Reason: Added shorter version

  14. #14
    Registered User
    Join Date
    04-12-2010
    Location
    *
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Thanks so much Cutter, that worked beautifully!

  15. #15
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    Which one????

    You're welcome.

  16. #16
    Registered User
    Join Date
    04-12-2010
    Location
    *
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Converting "mm min ss s" time format to "hh:mm:ss"

    I only tried the very short one

+ 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