BF Results : Number the race meetings in alphabetical order

Please post any questions regarding the program here.

Moderator: 2020vision

BF Results : Number the race meetings in alphabetical order

Postby hughsiepops » Thu Apr 07, 2011 9:58 am

Morning

From the Betfair results pages here < http://promo.betfair.com/betfairsp/prices/ > I would like to number the race meetings in alphabetical order. To give you an example on the 3rd April there were 2 UK race meetings that day Donc and MrktR. So all those races at Donc would have a ‘1’ placed in a new column and those at MrktR would have the number ‘2’ .. I know I could do this manually when I copy across each days results into a master spreadsheet, but it would be far more efficient for me to copy a months worth of results and apply a formula to do all races for that month in one go.

I would like the numbering to start again from '1' each day. So on the 4th April there 3 UK race meetings. Wind, Folk and Kelso. Here the numbering would start again at Folk. [ Folk ‘1’, Kelso ‘2’ and Wind ‘3’ ].

Would I have to refer to Column B (MENU_HINT) as it is the only column that contains the Meeting’s name (Eg. GB / Donc 3rd Apr and GB / MrktR 3rd Apr). I have no idea on how this could be done. Is this possible to do via a formula that I can simply drag / copy down the worksheet.?

Any help or advance would be much appreciated

Thanks
Hughsiepops
hughsiepops
 
Posts: 32
Joined: Mon Dec 17, 2007 3:26 pm
Location: Manchester

Postby osknows » Thu Apr 07, 2011 3:59 pm

I suspect you should really be doing this using a database rather than excel but here goes anyway. Firstly, the EVENT_DT is a mess in Betfair's data so needs tidied up.

Assuming data starts in row 2

In cell T2 put this:
=IF(ISERROR(DATEVALUE(D2)),DATE(YEAR(D2),DAY(D2),MONTH(D2)),DATEVALUE(D2))

In cell V2 put this:
=COUNTIF(INDIRECT(ADDRESS(MATCH(T2,$T$1:$T$65000,0),2,1)&":"&ADDRESS(MATCH(T2,$T$1:$T$65000,0)+COUNTIF($T$1:$T$65000,T2)-1,2,1)),"<="&B2)

In cell W2 put this array formula (CTRL+SHIFT+ENTER):
=SUM(1/(IF(INDIRECT(ADDRESS(MATCH(T2,$T$1:$T$65000,0),22,1)&":"&ADDRESS(MATCH(T2,$T$1:$T$65000,0)+COUNTIF($T$1:$T$65000,T2)-1,22,1))<V2,COUNTIF(INDIRECT(ADDRESS(MATCH(T2,$T$1:$T$65000,0),22,1)&":"&ADDRESS(MATCH(T2,$T$1:$T$65000,0)+COUNTIF($T$1:$T$65000,T2)-1,22,1)),INDIRECT(ADDRESS(MATCH(T2,$T$1:$T$65000,0),22,1)&":"&ADDRESS(MATCH(T2,$T$1:$T$65000,0)+COUNTIF($T$1:$T$65000,T2)-1,22,1))),9.999999999E+307)))+1

Then drag down
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am


Return to Help

Who is online

Users browsing this forum: Google [Bot] and 78 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.