+ Reply to Thread
Results 1 to 6 of 6

Convert to time

  1. #1
    Registered User
    Join Date
    11-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Convert to time

    I have a report that gives me time as 40h 2m. How can I convert this to a time that show as 40:02?

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

    Re: Convert to time

    Try

    =(LEFT(A1,FIND("h",A1)-1)&":"&TEXT(TRIM(MID(A1,LEN(A1)-2,2)),"00"))

    That will return it as a TEXT string 40:02, not a true time value.

    If you want a true time value, add 0 to the very end and format the cell with the formula as [hh]:mm
    =(LEFT(A1,FIND("h",A1)-1)&":"&TEXT(TRIM(MID(A1,LEN(A1)-2,2)),"00"))+0

  3. #3
    Registered User
    Join Date
    11-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Convert to time

    Perfect!!! Thank you so much for the quick response.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Convert to time

    Try this formula assuming your data in A2

    =SUBSTITUTE(SUBSTITUTE(A2,"h ",":"),"m","")+0

    format result cell as [h]:mm
    Audere est facere

  5. #5
    Registered User
    Join Date
    11-01-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Convert to time

    Great, thanks!! That worked too.

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

    Re: Convert to time

    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)

Similar Threads

  1. [SOLVED] convert decimal number to time : convert 1,59 (minutes, dec) to m
    By agenda9533 in forum Excel General
    Replies: 22
    Last Post: 09-15-2013, 10:43 AM
  2. Time stored as text. How can I convert to data and time?
    By matthewbutterworth in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-07-2013, 10:19 AM
  3. Replies: 4
    Last Post: 03-31-2006, 08:03 PM
  4. [SOLVED] convert time imported as text to time format for calculations
    By batfish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-27-2005, 07:05 PM
  5. Replies: 0
    Last Post: 08-23-2005, 12:22 PM

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