Hello,
I'm using very simple code to add the current date to a cell when the adjacent cell was modified.
It works well, except when you select the value and click the formula bar, without making any changes to the actual value, then click on some other cell.
When that happens, it assumes the value changed, and refreshes the date next to it.
I was wondering if there's a way to check if the value remained the same after clicking away, and if it did, keep the date value intact.
Here's the code:
Thanks.
I'm using very simple code to add the current date to a cell when the adjacent cell was modified.
It works well, except when you select the value and click the formula bar, without making any changes to the actual value, then click on some other cell.
When that happens, it assumes the value changed, and refreshes the date next to it.
I was wondering if there's a way to check if the value remained the same after clicking away, and if it did, keep the date value intact.
Here's the code:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Cell As Range
For Each Cell In Target
If Cell.Column = Range("C:C").Column Then
If Cell.Value <> "" Then
Cells(Cell.Row, "D").Value = Now
Else
Cells(Cell.Row, "D").Value = ""
End If
End If
Next Cell
End Sub
Thanks.