Stopwatch 100th of Seconds

  • I was wondering if there was a way to create a stopwatch of sorts. It's for a race. I want to be able to start or record a time that won't change. I know that you can use the now() function in excel, but how do you keep it from updating?

    Then, if possible, i would like to be able to enter the number and 'enter' and have it record a time (next to the number), or the current time of the computer accurate to 100th of seconds. This will serve as the timer and then i'll sort by times.

    Is this possible? I can't help but think this can work...any help much appreciated!!!

    You guys are amazing!

  • Let me give it a try based on the minimum requirement you have written.

    This can be used as a starting point and you can improve on the tool or ask for further help.

    1. On Sheet1 enter 4 headings in A1 to D1 "Number, Start, End, Time"
    2. Create three Named Cells (Insert -> Name -> Define) anywhere in the workbook. "Started, Number, Start" (which will be used for storting temp. values)
    3. Create a user form in VBE ( Ctrl + F11 to see VBE and then insert -> userform)
    4. Create one Text box and one command button on the user form.
    5. Paste following code in the code window for user form.

    This should help you record the timings for different players (numbers).

    If this is fine with you, we can work on getting the fastest etc.

    Thanks: ~Yogendra

  • so far so good...

    So, to be more specific, i want to start everyone at once, like a running race, then, as i put in their numbers and hit return(preferrably, but command button will do if not possible) i want it to record the time and the number and clear the text box to be ready for the next number, and so on... Everyone will have the same start, but different end times. I need to keep the form active so i can record mutliple times.

    I hope this makes sense. I really appreciate your help.

  • Following code will give you your desired output.

    The only change fron the previous solution is that, there is only one Named Rage "Start" and there is no command button. The stop watch starts as soon as the user form is initialized (in our case with a control button from the worksheet.

    Hope this helps

    Thanks: ~Yogendra

  • This looks good. I'll give it a shot. I think I got one working that I need, thanks to your previous code. I had a complication added. The is likely 2 start times, but i think i have that fixed ok now too. Thanks much yjoshi!!!


  • Re: VBA : anyone know how to create a stopwatch?? more...

    i have tried the code and it works fine but the difference between the start and the end time is formatted as Decimal numbers which is hard to be understand. can anyone format it as (mintues:seconds)

    i will be greatful if you could ..

    i am newbie in VBA but i am pretty good in VB.nET and Asp.NEt

    thank you

    Fugitive Mind

  • Re: Stopwatch 100th of Seconds

    Hi Fugitive Mind,


    Selection.NumberFormat = "mm:ss" 'Change the reference to suit your requirements.

    Or else, Press Ctrl+1 &gt Custom in the Category list box, then type mm:ss in the Type dialogue box.(this will also give the same result).


  • Re: Stopwatch 100th of Seconds

    This is great. Very close to what I'm looking to do, however, I need a few changes.

    How can I make it so you can run several different timers on the same worksheet. Each timer should be able to be started at different times and stopped at different times. If the user minimizes the application, the timer should continue to run.

    The point of all this is to be able to time several different projects that may start and/or stop at different times.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!