+ Reply to Thread
Results 1 to 6 of 6

Getting rid of weird time format 01m 16s

  1. #1
    Registered User
    Join Date
    06-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Getting rid of weird time format 01m 16s

    Hi,

    My data contains time lengths in the following format:

    2h 18m 43s

    01m 16s

    I need to use to total number of seconds, so for example for the second one I want to display the number 76.

    Any ideas?

  2. #2
    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: Getting rid of weird time format 01m 16s

    Please Login or Register  to view this content.
    B1 and copy down:

    =86400 * SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IF(ISERROR(FIND("h", A1)), "0h ", "") & A1, "h ", ":"), "m ", ":"), "s", "")
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Getting rid of weird time format 01m 16s

    That's awesome!

    Thanks a lot!

    My bad I forgot to mention that some cells only have seconds, like:

    16s

    How should I modify your formula? it works great when hours and/

  4. #4
    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: Getting rid of weird time format 01m 16s

    =86400 * SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IF(ISERROR(FIND("h", A3)), "0h ", "") & IF(ISERROR(FIND("m", A3)), "0m ", "") & A3, "h ", ":"), "m ", ":"), "s", "")

  5. #5
    Registered User
    Join Date
    06-29-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Getting rid of weird time format 01m 16s

    Works like a charm, thanks!

  6. #6
    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: Getting rid of weird time format 01m 16s

    You're welcome.

+ 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