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

  • Thread starter Thread starter J_P
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top