Challenging problem! Recording the time in an adjacent cell when text is entered

  • Thread starter Thread starter Snowy
  • Start date Start date
S

Snowy

Does anyone have a way of using excel as follows:

if I enter text in say cell A1 how can I ask excel to record the exact
time I entered that text (in minutes and seconds) in say cell B1

I assume you can use the clock on your computer or maybe a stopwatch
VBA plug in that counts time up or down in excel??

The reason for this is I'm wanting to use excel, run on my laptop, to
record when various events happen on the basketball court such as an
intercept, basket in the circle, basket outside the circle etc.

Cheers,

Snowy
Australia.
 
I assume you can use the clock on your computer

Yes. Enter start time in eg: H1 as eg: 11/09/2003 12:00:00. Then
right-click the sheet tab, select View Code. Paste this into the sheet's
code module -

Private Sub WorkSheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$A$1" Then
Range("B1") = Now - Range("H1")
End If
End Sub

Custom format B1 as [h]:mm:ss (no idea how long a game lasts).

But this will overwrite each time you update A1. Don't you need a log going
down column A of consecutive events?

Private Sub WorkSheet_Change(ByVal Target As Excel.Range)
If Target.Column = 1 Then
Target.Offset(0, 1) = Now - Range("H1")
End If
End Sub

HTH,
Andy
 
Back
Top