+ Reply to Thread
Results 1 to 7 of 7

Formatting cells to display a length of time, not time of day

  1. #1
    Registered User
    Join Date
    02-06-2012
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    4

    Formatting cells to display a length of time, not time of day

    Hi,

    I am trying to copy the results of a race from a word doc into excel.

    In the word doc they appear like this

    16.59
    17.22
    17.31
    18.12 etc

    I want them to look like this
    0:16:59
    0:17:22
    0:17:31
    0:18:12
    I'm running into lots of problems and it keeps thinking that im entering a time of day instead of a length of time.

    Any Advise would be great, Thanks

  2. #2
    Registered User
    Join Date
    01-12-2012
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Formatting cells to display a length of time, not time of day

    fogdarcy,
    Best thing to do would be to copy all those time, 16.58, 17.52..... into column A and put a formula in column B to change the values in column A to what you desire. See below code;
    Please Login or Register  to view this content.
    This will change the times appropriately. Just copy this into B1 and autofill.

    Daithi

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formatting cells to display a length of time, not time of day

    Assuming the numbers once you paste them are decimal values rather than time serial values you will need to convert them first using a formula like =A1/1440 and then format the results as a custom format h:mm:ss

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formatting cells to display a length of time, not time of day

    An alternative to using a formula to convert from a decimal value to time serials would be to pop 1440 in a spare cell, select your decimal values and then paste special...divide.

    Dom

  5. #5
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Formatting cells to display a length of time, not time of day

    It would help to know what problems you are running into. If you are trying to add the times, format the sum cell using [h]:mm:ss to get total time displayed.
    Good luck.

  6. #6
    Registered User
    Join Date
    02-06-2012
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Formatting cells to display a length of time, not time of day

    Thanks guys, that formula worked perfectly.

  7. #7
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formatting cells to display a length of time, not time of day

    Note if you are using Daithi's formula you will return a text string rather than a time value which if you want to do any calculations on will still require converting.

    Dom

+ 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