Code to create race timer in Excel

HI
I want to add a button into an Excel sheet to perform basic timing for multiple competitors in a race.

Basically, all the button needs to do is enter the current time (ideally down to 10ths or 100ths of a second) in a cell, and then move down to the next cell below, and enter the next time in that cell when the button (or Enter key) is pressed again

Thanks a lot!

Fergal
fjkilkenAsked:
Who is Participating?
 
zorvek (Kevin Jones)Connect With a Mentor ConsultantCommented:
A revision. A message added with instructions. A few more features.

Kevin
Q-26990141.xls
0
 
zorvek (Kevin Jones)ConsultantCommented:
I used this macro:

Option Explicit

Private StartTime As Double

Public Sub InsertTime()

    If StartTime = 0 Then
        StartTime = Timer
    Else
        ActiveCell = (Timer - StartTime) / 24 / 60 / 60
        ActiveCell.Offset(1, 0).Select
    End If

End Sub

See the attached workbook.

The first click of the button starts the timer. Each subsequent click records the time at the click in the active cell and moves the selection down one cell.

Kevin
Q-26990141.xls
0
 
dmitry_nCommented:
Try this excel logging stopwatch http://www.xnotestopwatch.com
0
 
fjkilkenAuthor Commented:
thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.