+ Reply to Thread
Results 1 to 8 of 8

help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    7

    help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

    The subject best described it and i'm trying to use this formula but it doesn't work:

    B8 is the time value un-formatted

    =if(B8=len(2),"00:"&B8,if(B8=len(3),"0"&text(B8,0:00),text(B8,00:00)))

    I can't figure out if it doesn't like my ""'s or no... help??

    Thanks!!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

    What is 00:54 ? Hours and min or min and sec?

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

    Does this help
    Please Login or Register  to view this content.
    ?
    Format as hh:mm:ss

  4. #4
    Registered User
    Join Date
    09-18-2012
    Location
    San Diego
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

    That worked perfectly!! Thank you! how does that work??

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

    Using the Evaluate formula tool you can see how the new string is created.Adding 0 ( or multiplying by 1) coerces the obtained string to it's numerical value

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

    Maybe this...

    =--TEXT(A2,"00\:00")

    Format as h:mm
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

    Quote Originally Posted by Tony Valko View Post
    Maybe this...

    =--TEXT(A2,"00\:00")

    Format as h:mm

    Much better !

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: help converting values (i.e. 54, 123, 1134) to time (i.e. 00:54, 01:23, 11:34)

    Thanks!

+ 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