Forum

Record tick by tick...
 
Notifications
Clear all

Record tick by tick seconds data from live feed along with timestamps

2 Posts
2 Users
0 Reactions
71 Views
(@jay_excel)
Posts: 11
Active Member
Topic starter
 

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

 
Posted : 04/09/2019 6:13 pm
(@catalinb)
Posts: 1937
Member Admin
 

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.

 
Posted : 06/09/2019 10:27 am
Share: