+ Reply to Thread
Results 1 to 9 of 9

Converting times (:xx to x:xx:xx)

  1. #1
    Registered User
    Join Date
    07-30-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Converting times (:xx to x:xx:xx)

    I need some help with converting times from :xx format to x:xx:xx without having to manually edit every single cell. An employee spent hours of work on creating these data points for me but didn't enter the times correctly. Essentially, he entering a time stamp of how long into a video that certain things happened so if something happened 3 seconds in, he entered this as :03 when I needed it entered as 0:00:03 to work with this other formula I have.

    I'm not super good with formulas and macros so I'm sure there's an easy way to do this but I must not be using the correct search terms to be able to find anything. If anyone can help me out, that'd be amazing!

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Converting times (:xx to x:xx:xx)

    What is the max and the min of the values, is it always an integer?
    If i is a format topic, you try using a custom format like:
    00 or 00 ":" 00 ":" 00
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    07-30-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Converting times (:xx to x:xx:xx)

    It will always be an integer. Min value would be 0:00:00 (beginning of video) and max would be somewhere around 5:25:00 (end of video) depending on where the camera decided to chapter the video. I have a formula that will take the chapter time (which is what I had my employee enter) and convert that to real time but it only works if I have the video time in x:xx:xx format. When it's just :xx or x:xx, I get a #VALUE! error.

    I've attached an image with two lines of data: the first being the error line, the second showing the correct output. I just manually edited the second line and I could do this for every cell but I have 600-700 cells that I'd have to edit in this way. Looking through the data I have, it looks like most of it is entered in a :xx:xx format so I'll mostly be needing to add just a leading 0 in the Hour section of time. If that's easier and I can get help with that, I can manually edit the ones that need a 0 in the hours and minutes section.
    Example.png

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Converting times (:xx to x:xx:xx)

    Is it possible you send a short Excel file with the data you shown in the display.
    What is confusing: The value of a cell is what is used by formula, the format of a cell don't have any influence of the value and therefore on the result of the formula.
    It is difficult to see what make the error with value 1 and gives a correct result with value 3.

  5. #5
    Registered User
    Join Date
    07-30-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Converting times (:xx to x:xx:xx)

    It's showing an error because the formula in far right cell is using the TIME formula and it sees that there is no hours and minutes to add/subtract from so it gives an error. At least that's my theory but I'm not the best with Excel.

    Here is the formula that's in the far right cell:
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Converting times (:xx to x:xx:xx)

    Looking over your original question regarding converting :03 to 0:00:03, you can use the following macro to do the conversion:

    Please Login or Register  to view this content.
    Note that is will create the new value one cell to the right of the selected values (offset 0,1).

  7. #7
    Registered User
    Join Date
    07-30-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Converting times (:xx to x:xx:xx)

    Thanks a ton! You saved me hours and hours of redoing this guy's work. I haven't tried it yet as I'm wrapping up some other stuff at the moment but if I have a time of say, 1:13, will that macro make it 0:00:01:13?

  8. #8
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Converting times (:xx to x:xx:xx)

    Actually, the macro above would only work for time formated as :03. To format 1:13 as 0:01:13, you would use the following:

    Please Login or Register  to view this content.
    The main difference between this macro an the last is the insertion of the zeros in the beginning of the formula (00: vs. 00:00). Probably could put an "if" statement in the macro to figure out the syntax, but at this point, you could use these macro separately to make the changes.

  9. #9
    Registered User
    Join Date
    07-30-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Converting times (:xx to x:xx:xx)

    You're my hero right now lol! I figured it would be a simple change in the macro but wasn't sure where that change would go. I'm currently taking an online course about Excel but it hasn't gotten into the macros yet so thank you so much for your help!

+ 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] Help converting times to numbers.
    By gannon_w in forum Excel General
    Replies: 5
    Last Post: 04-10-2015, 12:51 PM
  2. [SOLVED] Excel 2007 : Converting times
    By pennywaltz in forum Excel General
    Replies: 3
    Last Post: 04-10-2012, 12:09 PM
  3. converting times to 15 min bands
    By greyscale in forum Excel General
    Replies: 6
    Last Post: 11-21-2011, 10:05 PM
  4. Excel 2007 : Converting Times
    By karpinlj in forum Excel General
    Replies: 3
    Last Post: 09-20-2010, 10:39 AM
  5. converting times 1.08.30 = 68.3 seconds
    By pdp100% in forum Excel General
    Replies: 7
    Last Post: 04-02-2010, 03:36 AM
  6. Converting Times
    By charlesch in forum Excel General
    Replies: 1
    Last Post: 02-11-2009, 06:19 AM
  7. Subtracting times / Converting to Min
    By dreicer_Jarr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-17-2008, 03:20 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