Hello,
How do I record tick by tick second data along with timestamps in excel. Both, tick data and timestamp of that specific tick data must be recorded and stored. Please find the attached file for reference.
Regards,
Jay
Hi Jay,
You can use the Change event of that worksheet. Put the code below in that worksheet vb module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Cells(2, "B")) Is Nothing Then
Dim Dt As Date: Dt = Now
Dim Arr As Variant: Arr = Me.Range("B2:B10")
Dim NextRow As Long: NextRow = Me.Cells(Me.Rows.Count, "H").End(xlUp).Row + 1
Me.Cells(NextRow, "G") = Format(Dt, "hh:mm:ss")
Me.Range("H" & NextRow & ":P" & NextRow).Value = Application.Transpose(Arr)
End If
End Sub
The code is monitoring cell B2 only, I assume if there is a change here, all cells from B2:B10 will be changed.