+ Reply to Thread
Results 1 to 8 of 8

Formatting in Minutes, Seconds and Milliseconds only

  1. #1
    Registered User
    Join Date
    09-21-2008
    Location
    Australia
    Posts
    10

    Smile Formatting in Minutes, Seconds and Milliseconds only

    I am trying to format a time in Minutes, seconds and Milliseconds only.

    If I utilise the Custome Format and place mm:ss.00 in the format Excel alters the display it a AM/PM format in the formula bar.

    I have listed an example below:
    Entered into cell: 05:03.97
    Display in Formula Bar: 12:05:04 AM

    I am trying to use this format to calculate race times - where there is no need for an hour.

    In addition to this, is there a way that we could enter the data into the cell without having to place the : or . between the figures.
    For example:
    Enter 050397
    Excel translates to 05:03.97 automatically.

    I have tried to apply the formatting to the number after entry but excel automatically converts this to 12am and adds a date.

    Hoping you can help

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    You can use the following formula to simplify your typing work
    Eg, you can type the time in your prefer format, like "050599" in cell A13
    Remember to set the cell A13 to "TEXT" format before you key in anything.
    Then in another cell, say B13, keyin the formula

    Please Login or Register  to view this content.
    I need your support to add reputations if my solution works.


  3. #3
    Registered User
    Join Date
    09-21-2008
    Location
    Australia
    Posts
    10
    the problem with this is that it does not take into account that the middle digits can not be greater than 60.

    Any ideas anyone?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    with a1 formatted text and b1 formatted mm:ss.00
    try in b1
    =VALUE(LEFT(A1,2)&":"&MID(A1,3,2)&"."&RIGHT(A1,2))
    any 6 digit no entered in a1 resolves to time
    the cells in b can be added.
    even if you go wrong and put 006103 (61 seconds)
    this will change to 01:01.03
    as an extra precaution use data validation so text length is = 6
    Last edited by martindwilson; 09-22-2008 at 07:19 AM.

  5. #5
    Registered User
    Join Date
    09-21-2008
    Location
    Australia
    Posts
    10
    Thanx for your help guys. I was able to use the top formula and place some vba code around it to identify any errors.

  6. #6
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    Further to other questions already solved, use format [m]:ss.00

    HTH

  7. #7
    Registered User
    Join Date
    06-13-2016
    Location
    UAE
    MS-Off Ver
    2007
    Posts
    1

    Re: Formatting in Minutes, Seconds and Milliseconds only

    Hi, I need help
    I am using Data validation so that i can limit users to input time in any other format than mm:ss.00
    is there any way to do so?
    i tried applying custom formula =Text(C4,"mm:ss.00") but in this way when i enter correct format as well it gives error

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Formatting in Minutes, Seconds and Milliseconds only

    abdullah_alamin welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Formula to convert milliseconds into minutes
    By crashedinexcel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-09-2015, 06:57 PM
  2. Timer in milliseconds
    By jonlemur in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-19-2007, 10:02 AM

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