How to get data entry time to auto-populate in a cell?

J

J_P

I am using Excel2000 for keeping a Master Station Log (MSL). We add a
new row for each entry and in each row is a cell where we type the time
that the entry is made. The cell is in row B and I would like to know
how to make it automatically populate cell B with the time that Cell A
is populated. Can anyone help me out?? Thanks,
Justin
 
S

Scoops

J_P said:
I am using Excel2000 for keeping a Master Station Log (MSL). We add a
new row for each entry and in each row is a cell where we type the time
that the entry is made. The cell is in row B and I would like to know
how to make it automatically populate cell B with the time that Cell A
is populated. Can anyone help me out?? Thanks,
Justin

Hi Justin

Right-click the sheet's tab > View Code.

Paste this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
With Target.Offset(0, 1)
.NumberFormat = "hh:mm:ss"
.Value = Time
End With
End If
End Sub

Amend the NumberFormat as required.

Regards

Steve
 
Top