Last updated cells

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
sa7med
Posts: 800
Joined: Thu May 18, 2017 8:01 am

Which cell is the last updated cell? I've seen it written as being C3 but I remember Euler saying it was C4 (but am unable to find the post). Which one is it?
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

$A$1:$B$1
$G$1:$H$1
$C$2:$C$6
$F$2:$F$4
$A$9:$K$28
$T$9:$AE$28

Taken from the worksheet change event with debug.print Target.Address
sa7med
Posts: 800
Joined: Thu May 18, 2017 8:01 am

Thanks Nigel
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

My diagnostics are not the same sequence as Nigel advised. Mine are as follows.

$A$1:$B$1
$G$1:$H$1
$F$2:$F$4
$A$9:$K$24
$T$9:$AE$24
$C$2:$C$6

I am using the latest Betfair version v1.50 but pretty sure it was the same as v1.49.
From what I can recall on that Excel speed thread I think there is a difference in the cell sequence update between the Betfair version and the BetDAQ versions.

I have written some diagnostics out to a flat file prepended by the TickCount as follows

Code: Select all

Private Declare Function GetTickCount Lib "kernel32" () As Long

Private Sub Worksheet_Change(ByVal Target As Range)

   ofile = "C:\BA\debug\TargetAddress.txt"
   Open ofile For Append As #4
   TickCount = GetTickCount()
   Print #4, CStr(TickCount) + "," + Target.Address
   Close #4

   If Target.Address = "$C$2:$C$6" Then
     Call LogData(1)
   End If

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

End Sub
Diagnostics produced are as follows for two cycles on my machine of updating for Sheet(1) with 42 sheets loaded into excel for tomorrows races.
This clearly shows that $C$2:$C$6 is the last of 6 batches of cell updates per cycle with a 4.24 second gap between the refresh cycles.
I've added a line to break the two batches up for readability.

578591343,$A$1:$B$1
578591343,$G$1:$H$1
578591343,$F$2:$F$4
578591343,$A$9:$K$24
578591343,$T$9:$AE$24
578591343,$C$2:$C$6

578595587,$A$1:$B$1
578595587,$G$1:$H$1
578595587,$F$2:$F$4
578595587,$A$9:$K$24
578595602,$T$9:$AE$24
578595602,$C$2:$C$6
sa7med
Posts: 800
Joined: Thu May 18, 2017 8:01 am

Thanks for your input Wolf, I was a bit surprised to see that the C2:C6 range wasn't the latest. I wonder why you achieved different results? Nigel, could it be that you sheet was making some bets when you printed the results?
Bet Angel
Bet Angel
Bet Angel
Posts: 3999
Joined: Tue Apr 14, 2009 3:47 pm

Having checked the code, I can confirm that the C2:C6 range is the last to be updated.

Other ranges will only update when certain settings are ticked (Matched/Unmatched info, Additional columns etc), but C2:C6 will always update. C2:C6 also contains the timestamp, so it made sense to use that as a signal that refresh is complete.
sa7med
Posts: 800
Joined: Thu May 18, 2017 8:01 am

Thanks for confirming :D
Wolf1877
Posts: 367
Joined: Fri Sep 08, 2017 10:59 am

Bet Angel wrote:
Wed Apr 25, 2018 11:19 am
Having checked the code, I can confirm that the C2:C6 range is the last to be updated.

Other ranges will only update when certain settings are ticked (Matched/Unmatched info, Additional columns etc), but C2:C6 will always update. C2:C6 also contains the timestamp, so it made sense to use that as a signal that refresh is complete.
Can you check the code for the BetDAQ version too?

In the Excel Speed thread the sequence that Nigel reported was also reported by spreadbetting who said he only uses the BetDAQ version.
If the Betfair and BetDAQ versions of BA are different in the sequence of populating excel cells this may be the possible cause of the confusion.
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”