how do I record the time data is entered into a spreadsheet?

G

Guest

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.
 
C

carlo

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
 

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

Top