Mgibson022
New Member
- Joined
- May 13, 2022
- Messages
- 1
- Office Version
- 2013
- Platform
- Windows
Hi there,
I have created a timestamp using VBA, however when I filter data in my table or add a row, it changes the date/time to the current date/time for every entry that the timestamp is showing for.
I need the date/time stamp to be static and apply to a cell when the prior data in the column before it shows as "yes".
The current VBA code I have is:
Function MyTimestamp(Reference As Range)
If Reference.Value = "Yes" Then
MyTimestamp = Format(Now, "mm-dd-yyyy hh:mm:ss")
Else
MyTimestamp = ""
End If
End Function
Can anyone please help to correct this? I've spent hours trying to figure out how to correct it.
Thank you!
I have created a timestamp using VBA, however when I filter data in my table or add a row, it changes the date/time to the current date/time for every entry that the timestamp is showing for.
I need the date/time stamp to be static and apply to a cell when the prior data in the column before it shows as "yes".
The current VBA code I have is:
Function MyTimestamp(Reference As Range)
If Reference.Value = "Yes" Then
MyTimestamp = Format(Now, "mm-dd-yyyy hh:mm:ss")
Else
MyTimestamp = ""
End If
End Function
Can anyone please help to correct this? I've spent hours trying to figure out how to correct it.
Thank you!