bet result (won or lost)in excel

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
martypillow
Posts: 3
Joined: Mon Jun 05, 2017 1:51 pm

Hi,is there a way to get the result of a bet.(won or lost).
Into the excel sheet?
simopagliari
Posts: 7
Joined: Mon Oct 03, 2011 2:14 pm

Up for this question!
I am looking for the same: I have a sequence of spreadsheets on various events, and I would like to set a stake depending on the result of the previous event. Unfortunately I cannot find a way to include a won/lost cell.
Any idea?
Thank you!!
simopagliari
Posts: 7
Joined: Mon Oct 03, 2011 2:14 pm

I am trying to work on this. Looking at old posts it looks like the only option is to use the LTP, i.e. the selection with 1.01 available to lay is the winner option. To see if you won in that market, you can use VLOOKUP in cell J2 (or any free one) to check whether the winner row has a PLACED bet in your status cell. For example:

=VLOOKUP(1.01,H9:S32,8)

Cell J2 will then show PLACED if the placed status and the 1.01 lay are in the same row, otherwise it would be "0" or blank. Then you can easily arrange for another cell to show if you have won or lost, in this way:

=IF(J2="placed","WON","LOST")

These are just my initial thoughts so there may be a better way, but should be a starting point..
simopagliari
Posts: 7
Joined: Mon Oct 03, 2011 2:14 pm

I don't know why but I noticed that VLOOKUP is not reliable, as J2 shows PLACED even if there is not 1.01 in lay (I think this is due to rounding). But I found another way.

Go to the far end of the spreadsheet (column AF) and arrange for the cell to show "1" if cell in column H on the same row is 1.01. Then go to the following cell and arrange to show "1" if cell in column O is PLACED. Otherwise they have to show "-1".
=IF(H9=1.01,1,-1)
=IF(O9="PLACED",1,-1)

Cell AH is the sum for AF and AG:
=SUM(AF10:AG10)

Do the same on all rows. Now, in column AH you will have some some -2's, maybe a couple of zeros and one single 2 only if you have a 1.01-lay and a PLACED on the same row, i. e. a winning bet.

Now you just have to take a blank cell and use COUNTIF to count the number of cell whose value is 2. If you have one cell with value=2, your bet won.
=COUNTIF(AH10:AH20,"=2")

Otherwise you won't have any.
User avatar
workpeter
Posts: 165
Joined: Sat Jul 30, 2016 8:29 pm

Its not reported by betfair so no. You can infer with LTP but its not always reliable
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 pm

The API sends the winner data in the price data request once the market has been settled these days. Personally for botting I can't see any good reason why you need to know the result of a previous race to decide what you're going to do on the next race as it's unlikely the data you're using will have any effect. Plus delays like stewards and late settlements will always flaw the data.

If you really do need the data and happy to bodge it to get as quick an indication as possible LTP is pretty much your only option and shouldn't be hard to find with a little VBA, you'd really want to be looking for the minimum value rather than 1.01 as not every winner hits 1.01
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”