Check Bet Reference (Column T) in Excel

Please post any questions regarding the program here.

Moderator: 2020vision

Check Bet Reference (Column T) in Excel

Postby MollyMoo » Wed May 09, 2018 6:54 pm

I'm trying to detect if Gruss reports an error in Excel's Bet Reference (column T) cell after a bet has been submitted. My code is as follows:

Code: Select all
If .Range("T" & matchRow) <> "PENDING" Then 'Bet has been processed
                        If .Range("T" & matchRow) <> vbNullString And IsNumeric(.Range("T" & matchRow)) = False Then 'Report is not a bet number - must be error
                            'Cancel Bets & Green Up
                            CGreen ("Report") 'Call green up routine
                            GoTo Finish
                        Else
                           'Carry on processing
                        End If
                    End If


However, this doesn't appear to be working as it's sometimes detecting an error when there isn't one. Is there a better way of doing this? I thought a non-numeric value in column T would indicate an error. TIA.
MollyMoo
 
Posts: 90
Joined: Mon Sep 11, 2017 9:31 am
Location: UK

Re: Check Bet Reference (Column T) in Excel

Postby Daywalker » Wed May 09, 2018 9:35 pm

Hi Mollymoo,

What is it sometimes picking up?

Are you updating (UPDATE, UPDATESTAKE) or replacing (BACKR, LAYR) bets? If so the bet ref includes "N" making it a string, so isnumeric=false.

If it is visually a number that your code is picking up (but handled as a string), you could try converting the betref to number - CDbl(betref) or CSng(betref).

D
Daywalker
 
Posts: 194
Joined: Wed Aug 18, 2010 11:43 pm
Location: Mid-West Yorkshire

Re: Check Bet Reference (Column T) in Excel

Postby Captain Sensible » Wed May 09, 2018 10:10 pm

You also need to take into account part matched bets which have a P at the end of them i.e. 1222744789P
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm

Re: Check Bet Reference (Column T) in Excel

Postby MollyMoo » Fri May 11, 2018 11:11 am

Thanks to both of you for replying.

Daywalker - I'm using a BACK command with an OFFSET LAY parameter. I haven't captured up to now what the code actually reads from column T, but will do in the future.

Captain Sensible - I think you might have hit the nail on the head. It all happens too quickly to catch visually, but if the bet is partially matched and then very quickly fully matched, the code may be picking up the bet reference with the added "P" before I've had chance to notice it. I've now changed the code to ignore any partially matched reference and we'll see what happens. No anomalies yesterday after changing the code.
MollyMoo
 
Posts: 90
Joined: Mon Sep 11, 2017 9:31 am
Location: UK

Re: Check Bet Reference (Column T) in Excel

Postby MollyMoo » Tue May 15, 2018 3:46 pm

Well, 4 days on and no more anomalies since checking for the trailing "P" in the bet reference. So I think that was the problem. Thank you very much Capt. Sensible.
MollyMoo
 
Posts: 90
Joined: Mon Sep 11, 2017 9:31 am
Location: UK

Re: Check Bet Reference (Column T) in Excel

Postby Captain Sensible » Tue May 15, 2018 5:37 pm

Good to see it's working, I had a similar problem when checking for errors before placing offset bets.

If you use the UPDATE trigger it's worth noting they betref can be suffixed or appended with an N also.
User avatar
Captain Sensible
 
Posts: 2883
Joined: Sat Nov 19, 2005 2:29 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 24 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.

cron