how do I record the time data is entered into a spreadsheet?
On Nov 15, 10:48 am, bmk wrote:
I want to record the time and date data is entered into a row on a
spreadsheet and not have it change when more data is added to the next row,
using the =now() formula will update every time data is entered on the next
row, I want each row of data to have a time stamp of when it was first put in.
You could try this:
rightclick on your worksheet = view code
and enter following:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim colInt As Byte
Dim ws As String
colInt = 3 '=C change to whatever column you want to enter the date
ws = "sheet1" 'change to the name of your worksheet
If Worksheets("sheet1").Cells(Target.Row, colInt).Value = "" Then
Worksheets("sheet1").Cells(Target.Row, colInt).Value = Now()
End If
End Sub
hth
Carlo
|