+ Reply to Thread
Results 1 to 6 of 6

Time format (example: 00:00.00)

  1. #1
    Registered User
    Join Date
    03-09-2017
    Location
    Pecs
    MS-Off Ver
    MS Excel 2016
    Posts
    3

    Time format (example: 00:00.00)

    Hi there,

    I have some problems with my time format.

    I want this format : mm:ss.ff example 01:22.98
    Which format or macro can do that, the user is typing the time value starts with minutes:second.hundredth of a second.
    When she/he is typed the six characters she/he hit enter button and the format is jumped to 00:00.00 format style.

    Example:

    user type:

    012099 -> hit enter -> the format change to this : 01:20.99

    How can I do this?
    I hope it's possible.

    Thanks with advance.

    ps: Sorry my English
    __________
    Thanks,
    P.

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Time format (example: 00:00.00)

    Hi,
    You could try to manage this with Time format.
    First make cell where you will enter "012099" as Text formatted, just to keep leading "0".
    Then just use formula like
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Time format (example: 00:00.00)

    Method which converts number string into timevalue.

    First set range's cell format to "mm:ss.00"

    In Standard Module.
    Please Login or Register  to view this content.
    Then in Worksheet module (Change range as needed).
    Please Login or Register  to view this content.
    See attached.

    Note: Not fully tested. If you find issue, let me know.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-09-2017
    Location
    Pecs
    MS-Off Ver
    MS Excel 2016
    Posts
    3

    Re: Time format (example: 00:00.00)

    Hi

    Firstly, thanks for the quick answer.

    Secondly, I can't use macro because I am noob in Excel. I tried in many ways. I'm reading a lots how to implement macro to the Excel, but I can't to this.
    I'm writed a program who only can read the time score only this format "00:00.00". In my write program can't accept other format. beacuse who is ordered said he need only this format.

    May I upload the xls and you implement the macro?
    What I need in the worksheet :

    In the worksheet where I needed this format I painted orange color.

    So all in all:

    Where the cells are orange, the user can't write other than 00:00.00. The numbers can change but the ":" and "." characters can't.

    I said again thank you very much.

    Please help me.

    Very very thanks.

    Here the attached file:
    https://drive.google.com/open?id=0Bz...kFxLThmeHF2enM

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Time format (example: 00:00.00)

    Hmm. If you are not able to implement above. I wouldn't recommend using VBA in your project.

    Above is just sample of how it can be implemented. In real-life scenario, you'll need to think how user will input data.

    Will they always type it in? Will they copy and paste? What should happen if invalid entry is made? etc etc.

    As for my code just copy and paste Function code into Module1, and Worksheet code to Munka1 (code). Change Range("B2:B100") to Range("D9:M48").

    Note that data should be entered as numeric string only (ex. 012945).

  6. #6
    Registered User
    Join Date
    03-09-2017
    Location
    Pecs
    MS-Off Ver
    MS Excel 2016
    Posts
    3

    Re: Time format (example: 00:00.00)

    Hi,

    it's works. It's enough for me.

    Big thanks.

+ 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] time sheet help, format TIME and formula based on the actual time entered.
    By bh mng in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-06-2016, 01:10 PM
  2. Format time from military time to standard time
    By Valencia0307 in forum Excel General
    Replies: 7
    Last Post: 06-01-2014, 11:15 AM
  3. Custom time format, how to create specific format?
    By JackBauer in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-26-2013, 03:05 AM
  4. Change format of lots of data cell to a time format
    By dazza67 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-24-2013, 03:24 PM
  5. Convert date and time in serial number format to text format
    By nda13112 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2013, 02:45 PM
  6. Excel: How to convert time format into number format that can be added?
    By Frances Jones in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-17-2012, 04:10 PM
  7. Display time in time format instead of decimal format
    By CasualVisitor in forum Excel General
    Replies: 5
    Last Post: 07-03-2009, 06:24 PM

Tags for this Thread

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