Colleting race card data

Please post any questions regarding the program here.

Moderator: 2020vision

Colleting race card data

Postby etrader » Thu Jul 08, 2010 10:07 am

Hi,

Im trying to collect race card data (including trainers, jockeys info etc.) for all UK races. When i moving to the next race by Q2 modifier all additional cells (trainers, form etc) are empty.
Here is my code. WHat should i do to get all data?
Code: Select all
        If Target.Columns.Count = 16 Then
            If MarketHead <> Range("A1").Value Then
                BAarray(1) = Cells(1, 1).Value
                For i = 5 To UsedRange.Rows.Count
                    BAarray(2) = Cells(i, 1)
                    BAarray(3) = Cells(i, 25)
                    BAarray(4) = Cells(i, 26)
                    BAarray(5) = Cells(i, 27)
                    BAarray(6) = Cells(i, 28)
                    BAarray(7) = Cells(i, 29)
                    BAarray(8) = Cells(i, 30)
                    BAarray(9) = Cells(i, 31)
                    BAarray(10) = Cells(i, 32)
                    BAarray(11) = Cells(i, 33)
                    BAarray(12) = Cells(i, 34)
                    BAarray(13) = Cells(i, 35)
                    BAarray(14) = Cells(i, 36)
                    BAarray(15) = Cells(i, 37)
                    BAarray(16) = Cells(i, 38)
                    BAarray(17) = Cells(i, 39)
                    BAarray(18) = Cells(i, 40)
                    j = 1
                    Do While j < 19
                        If BAarray(2) = "" Then Exit Do
                        ThisWorkbook.Sheets("Race Card Info").Cells(k, j).Value = BAarray(j)
                        j = j + 1
                    Loop
                    If BAarray(2) <> "" Then k = k + 1
                Next i
                MarketHead = Range("A1").Value
                Range("Q2").Value = -1
            End If
            If Range("J3").Value = "L" Then
                LoadRaceCard = False
            End If



best regards
Valery
etrader
 
Posts: 7
Joined: Thu Jul 08, 2010 9:52 am

Postby GaryRussell » Thu Jul 08, 2010 11:00 am

The form data is retrieved in the background and BA does not wait for the data to be loaded before updating Excel. On the first refresh on the new market the cells will contain a space. If the data has still not been retrieved on the next refresh then the cells will be blank. This will be fixed in a future release so that they will always contain a space until the data is available. This will make it easier to identify that the data is still being retrieved.

You can update your second "If" statement to read as follows. It should work.
Code: Select all
If MarketHead <> Range("A1").Value and Cells(5,25)<>"" and Cells(5,25)<>" " Then

It will work best if you change "Cells(5,25)" to refer to the jockey cell as this should always be present.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby etrader » Fri Jul 09, 2010 9:22 am

GaryRussell wrote:The form data is retrieved in the background and BA does not wait for the data to be loaded before updating Excel. On the first refresh on the new market the cells will contain a space. If the data has still not been retrieved on the next refresh then the cells will be blank. This will be fixed in a future release so that they will always contain a space until the data is available. This will make it easier to identify that the data is still being retrieved.

You can update your second "If" statement to read as follows. It should work.
Code: Select all
If MarketHead <> Range("A1").Value and Cells(5,25)<>"" and Cells(5,25)<>" " Then

It will work best if you change "Cells(5,25)" to refer to the jockey cell as this should always be present.

Gary, thanx a lot, it work!
etrader
 
Posts: 7
Joined: Thu Jul 08, 2010 9:52 am


Return to Help

Who is online

Users browsing this forum: Majestic-12 [Bot] and 41 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.