I would like to capture the time of data entry (in column 1) for each value input to (column 5). I'm using this modified bit of code I got from here: Excel Formula which places date/time in cell when data is entered in another cell in the same row
This code functions as intended but still returns "Runtime Error '1004': Application Defined or Object Defined Error". Is there any way I can ignore this error, or perhaps fix the problem? I'm fairly new at this so bear with me.
My Target Column (5) Is where I'm checking for a number greater than 0, this is the trigger to update the time in Column 1
Column 5 has text cells above the range (E9:E50) I want to check. Which may be causing issue
When I go to debug, the second line of my code is highlighted with no other hints
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 And Target.Offset(0, -4).Value = "" Then
If Target.Column > 0 Then
Target.Offset(0, -4) = Format(Now(), "HH:MM:SS")
End If
End If
End Sub