Program Timing is Critical. I tried to eliminate any issues I can foresee without knowing anything about your Workbook.
Anyway. . .
Place this code in the ThisWorkbook Code Page
Option Explicit
Private Sub Workbook_Open()
NextLogRow = Sheets("Log").Cells(Rows.Count, "A").End(xlUp).Row
End Sub
Place this code in the Data Sheet Code Page
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 Then Exit Sub
LoggerCaller Target
End Sub
Function LoggerCaller(Target)
Dim Data As Variant
Target.Row.Calculate
If Target <= Target.Offset(, 1) And Target >= Target.Offset(, 2) Then Exit Function
NextLogRow = NextLogRow + 1
Data = Target.Offset(, 3).Resize(, DataColumnsCount).Value
UpdateLog Data
End Function
Place this code in a Standard Module.
Be sure to set the value of DataColumnsCount to the number of columns, including "Action," that you want logged.
Option Explicit
Public NextLogRow As Long
Public Const DataColumnsCount As Long = 5 'Edit to reflect number of Data Columns
Public Sub UpdateLog(Data As Variant)
Dim ThisRecord As Range
Set ThisRecord = Sheets("LOG").Range("A" & NextLogRow) '.Resize(, DataColumnsCount)
With ThisRecord
.Value = .Offset(-1) + 1
.Offset(, 1) = Date
.Offset(, 2) = Time
.Offset(, 3).Resize(, DataColumnsCount) = Data
End With
End Sub
Save and Close the Workbook. Only then open it and test it. The Workbook_ Open sub must run before testing.