very very new to VBA but i have a spreadsheet that has entries by several people as a log.
i have tried the below code but every time the sheet was opened, the dates update:
Function Timestamp(Reference As Range)
If Reference.Value <> "" Then
Timestamp = Format(Now, "dd/mm/yyyy")
Else
Timestamp = ""
End If
End Function
After looking through some other queries i tried the below;
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub 'Does nothing if several cells are changed
If Not Intersect(Target, Range("A:A")) Is Nothing Then 'Only if cell changed in column A:
Target.Offset(, 1).Value = Timestamp(Target) 'Put the TimeStamp on column B
End If
End Sub
but this doesn't seem to do anything at all.
Can anyone help? I have had circular formulas before but found that it caused issues with lots of people in and out.
Thanks!
i have tried the below code but every time the sheet was opened, the dates update:
Function Timestamp(Reference As Range)
If Reference.Value <> "" Then
Timestamp = Format(Now, "dd/mm/yyyy")
Else
Timestamp = ""
End If
End Function
After looking through some other queries i tried the below;
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub 'Does nothing if several cells are changed
If Not Intersect(Target, Range("A:A")) Is Nothing Then 'Only if cell changed in column A:
Target.Offset(, 1).Value = Timestamp(Target) 'Put the TimeStamp on column B
End If
End Sub
but this doesn't seem to do anything at all.
Can anyone help? I have had circular formulas before but found that it caused issues with lots of people in and out.
Thanks!