Making a time stamp
Rick, Bernie's code will work great for you if you want to update the
date/time stamp for a row when you update any cell in that row. If you
don't want that to happen (have an original date/time stamp for when
the info was first entered) then here is Bernie's code modified. This
code will enter a date/time a stamp into column A only if it's blank.
Also, if you'd like the time along with the date, change Date value to
Now in the code and format accordingly.
hope this was helpful
Sandy
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
If Not Intersect(Target, Range("B1:H1000")) Is Nothing Then
If Cells(Target.Row, 1).Value = Empty Then
Cells(Target.Row, 1).Value = Date
End If
End If
Application.EnableEvents = True
End Sub
Rick wrote:
I need to make a column in a worksheet that will automatically enter the time
and date the info was entered in that row.. I have been playing with the
=NOW() function, but no luck so far.
Thanks!!
|