Hi everyone needing some assistance writing a VBA. I am trying to timestamp when information is entered into Cell A. I want Date to enter into Cell B and Time to enter into Cell C.
I am able to get it to work with this VBA for Date but when I add the Time it seems to slow or freeze excel. Does anyone have any suggestions?
Private Sub Worksheet_Change(ByVal Target As Range)
' Auto Date
Dim Cell As Range
For Each Cell In Target
If Cell.Column = Range("A:A").Column Then
If Cell.Value <> "" Then
Cells(Cell.Row, "B").Value = Date
Else
Cells(Cell.Row, "B").Value = ""
End If
End If
Next Cell
End Sub
I am able to get it to work with this VBA for Date but when I add the Time it seems to slow or freeze excel. Does anyone have any suggestions?
Private Sub Worksheet_Change(ByVal Target As Range)
' Auto Date
Dim Cell As Range
For Each Cell In Target
If Cell.Column = Range("A:A").Column Then
If Cell.Value <> "" Then
Cells(Cell.Row, "B").Value = Date
Else
Cells(Cell.Row, "B").Value = ""
End If
End If
Next Cell
End Sub