fomulas for tracking time entered text or data

  • Thread starter Thread starter WHGRIT
  • Start date Start date
W

WHGRIT

When I enter text into cell in column A, I would like the date and time to
appear in a cell in Column C. I need to track the date and time each cell in
column A is data entered.
 
You could use a formula if you want date/time to change each time excel
recalculates.

If you want that date/time to be static, you're going to have to use a macro.

If you want to try, rightclick on the worksheet tab that should have this
behavior. Select View Code and paste this into the code window that just
opened.

Then back to excel to test it out.

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

Dim myRngToCheck As Range
Dim myIntersect As Range
Dim myCell As Range

Set myRngToCheck = Me.Range("A:A")

With Target
Set myIntersect = Intersect(myRngToCheck, .Cells)
If myIntersect Is Nothing Then
Exit Sub 'nothing to do
End If

Application.EnableEvents = False
On Error Resume Next
For Each myCell In myIntersect.Cells
With myCell.Offset(0, 2)
.NumberFormat = "mmm dd, yyyy hh:mm:ss"
.Value = Now
End With
Next myCell
On Error GoTo 0
Application.EnableEvents = True
End With

End Sub
 

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