OZmium Sports Betting and Horse Racing Forums

OZmium Sports Betting and Horse Racing Forums (http://forums.ozmium.com.au/index.php)
-   General Topics (http://forums.ozmium.com.au/forumdisplay.php?f=59)
-   -   Excel Formula Help (http://forums.ozmium.com.au/showthread.php?t=15977)

Sparky12 29th May 2007 10:38 PM

Excel Formula Help
 
Hi

I use MS Excel to analyse form data which I currently manually type into my spreadhseet using Racing and Sports form guide. To try and save on the manual labour I have been trying to "copy and paste" data from various websites to save manual data entry. One of the problems I am coming up against is that certain data (eg: last four starts) gets pasted into a single cell in Excel "3x45" or "1121" etc. Same problem arises with a horses distance record eg: 21 starts for 1 1st and 3 nds and 0 thirds means that 21-1-3-0 appears as a (text string?) in a single cell in Excel.

I need to break this data up into separate cells to run my calculations eg: last four starts would have 1 1 2 1 in four separate cells - but am unclear whether Excel has the funtionality to allow me achieve this?

Has anyone any experience or advice they can provide?

I'd also greatly appreciate any advice from the forum on god sources of electronic form data (Southcoast?) - manual labour is not for me!

Thanks everyone

Shaun 29th May 2007 11:31 PM

1 Attachment(s)
This should provide all the formulas you need, depemds where you get your form from i get all of mine from TVF free form with last 3 starts this is all added with copy and past, the fields are copied from the webpage and pasted in, the form is copied from the page then pasted to a text document then i import this.

I then use the ratings listed on the page to automaticly rate the runners.

Sparky12 30th May 2007 06:53 AM

Shaun

Many thanks for providing this info, very much appreciated. Looks exactly what I'm after - stand by for a flurry of posts from me with limitless clarification questions re the formulas/macros!

Thanks again and will let you know how I go. Will also have a look at the VFG data.

Cheers

Shaun 30th May 2007 08:56 AM

Np it is easier for me to explain answers when you have the sheet to go by, so fire away when ready.

Chinbok 31st May 2007 11:52 AM

Hi Shaun,

I'm interested in your rating method. Do you log every race, every day and do you know what your strike rate is long term?

It seems that a horse gets a track and distance score for winning and/or placing. However, a horse with 100% win strike rate doesn't get the place component of the score. The figures; 5 starts for 1 win and 1 place scores better than 3 starts for 3 wins.

Are you copying and pasting manually? This can be automated using the Web Query under Import External Data. If you use the macro recorder and do a Web Query you can see the code that you need.

Cheers

Chrome Prince 31st May 2007 12:42 PM

That's an excellent spreadsheet Shaun, well done.
I know how much time it takes to get all that right.

Shaun 31st May 2007 03:29 PM

Funny you say that CP about getting it right, i found an error in it the other day before posting it here not sure how long it has been there.

As for the win and place ratings i am only rating as long as they have had 1 win or place if they have had 10 for 10 they still get the same, this sheet i have used for many ratings methods it is more of a template rather than a current method i am using but it helps to have things in place to explain it.

Looking at what you said about the distance and track options it might be better to use a percentage of starts of these conditions as the ratings method, i might make the change and see how i go.

When i have used different methods i keep records i am a bit of a lazy punter, i know the method listed here had a 30+% with the top selection and about 70+% with the place but as we all know it is price that counts and i have always used the top 4 selection and backing those above $4 but you can make your own changes.

Yes this is done with copy paste so i can see if i need to make adjustments for horses with less than 3 starts it only takes me about 2 minutes to process a race and i find this is ok as i only look at open and above races most of the time.

This will also export to a text file with the date as the file name so takes about 30 minutes to do all my selection and print on a sheet.

Sparky12 2nd June 2007 09:29 AM

Shaun


Once again mate, many thanks for sharing the excel file - I've spent a few late nights this week with Excel manual in hand getting to grips with things and your formulas will save me so much time its not funny.

One quick question for you. How do you import your data? I've done a copy and paste from VFG website and much of the data (except the race field info at the top) pastes into Excel as one column. I notice from your file (eg: rows 156 to 162) that you have evrything separated into columns which enables you to pick up info from cells such as D159 etc.

How do you achieve this? Is it using the text to columns function in Excel or do you import the data in some way that it automatically presents data in the way you want it?

Cheers

Mark

Shaun 2nd June 2007 12:11 PM

2 Attachment(s)
Yes i thought that might be a problem for you, it is a bit of a DIY approach but i will explain what i do.

I find the race i want to rate then i copy the race list from this point as shown in "Starters.doc" this is copied directly to the excel sheet after pressing field so it aligns correctly.

I then copy the form as shown in "race.txt" but this is pasted to a text document first then i use the "import data" feature in excel 2003
selecting "Delimited" i then check mark all the delimiters and on the next screen i just select finish and on the last screen i press ok.

As long as you have pressed the "form" button on the sheet before you start the import the data will go to where it needs to be.

The only problem you will have is where a runner has only two starts you will need to insert some data in the text document before you save it, because i only use the last two runs for most of my rating i just copy one of the last two runs and insert it in the correct place this will make it all work out in the end.


PS. i had to cut the form short to reduce the file size for upload)

Sparky12 2nd June 2007 11:48 PM

Many thanks Shaun. Prior to seeing your post I went with the ultra simple option and cut and paste the data directly into Excel from the VFG website. I then ran the "text to columns" utility which treated the data as delimited text and broke the data into colums in an almost identical manner to your own columns . I've rated a few races now (using my own system which looks quite similar to yours) and it seems to work OK but I'll keep checking in case it comes unstuck. I've recorded a macro to run the formatting of the imported data and make a few other changes and I can be done in less than 2 mins. Again, this is all thanks to your formulas!

Cheers

Shaun 3rd June 2007 12:49 AM

Cool glad you got it working, i am no excel wiz most of what i know i learned from testing and asking questions on http://www.mrexcel.com/board2/index.php this is a fantastic site most times i can ask a question and have and answer within an hour or two.

Shaun 8th June 2007 08:06 AM

Hi again,

I found a problem with the import feature i have been using and thought i would post the answer here.

With Microsoft Office 2003 when importing the text file using Data and then import external data you need to change the "File Origin" in step 1 from "Unicode (UTF7)" to "Unicode (UTF8)" and in step 3 select "text" under "Column data Format" so that the excel doc will accept the "+" that indicates a win if not it will leave it out and stuff up the rating as i have found.

In my ratings this is not a problem unless the winner has won by more than half a length because it will get a penalty and can reduce it's overall score

travelrock 11th June 2007 04:24 PM

IMO it's better to do your form with pen and paper. That way you dont get bogged down in spreadsheets and you are focusing more on the horses then the formulas.

Print out your system and then work from that with pen and paper.

Scan the form to identify the top 5 chances then work out your ratings.

You can do it pretty quick after a bit of practice and in the process you learn more about the horses.

Neurokahuna 24th August 2007 12:19 AM

Useful web query spreadsheet...time to give back...
 
1 Attachment(s)
Hi all,

I just wanted to give something back to the Propun forums, albeit a token gesture. I have gleaned so much knowledge and information off here in the last 12 months, I figured I should offer my little contribution, a web query import/form splitter for Excel 2000-2007.

OK, what does it do? Well, I always wondered how screen scraping works. Then I discovered Web Queries.....they allow you get the form and DFS for free (this one is for UniTAB) rather than having to copy and paste it into the spreadsheet manually. Once your used to it, the process takes only a few seconds to load a whole race's information in including the most recent prices.

I've haven't investigated the other TABs but I imagine that with a little reformatting of the cells you can do it easily enough.

The real beauty is that as once you load a race, you can simply right click on the race and click 'Refresh Data!'...and it does....all the prices as they change right up until they jump.

I can tell you how to build the formula to work out what percent is on what horse as you refresh the race details, but that info is already on here...you just need to convert it to a formula....I have and it helps a lot with dutch betting.

Warning for UniTAB punters....the UniTAB site changes format once a race jump time gets within 5 minutes.....as a rule, remember to re-import the race information once the '5 mins to go' message pops up on the web page, or do what I do, and only load races running in the next five minutes.....If it does go pear-shaped, simply shut the spreadsheet down (WITHOUT SAVING) and re-open it.

Give it a crack and if you need any help, e-mail me on suntzu4@hotmail.com

Good luck,

Neurokahuna

Sparky12 25th August 2007 07:17 AM

I'll be the first to say many thanks for this Neuro. I struggled getting web queries to work the way I wanted previously so will have a play and see how I get on. However my biggest "thank you" is reserved for the LEN() formula in your spreadsheet. I couldn't work out how to get round the problem of horses with less than four starts and now I've got the solution! Next time please don't wait 12 months to post the solution!


Cheers mate

Crackone 25th August 2007 03:38 PM

Thanks Neurokahuna will have a look.

Zlotti 5th September 2007 07:56 PM

Shaun

Me thinks you changed your email address... hmm... was that to get away from questions?

I would appreciate a few minuyes of your time when you are free.

Cheers

Zlotti

kennedy22384 19th May 2009 10:50 AM

1 Attachment(s)
Hi All,

I have attached a spreadsheet for all of you to try out. The system is called Method 260 which was given to me for free from the nice people at racerate.

Instructions:

Open spreadsheet to the Main tab
Press Alt-F8 to bring up the macros window
Select Method260 and press run
Enter the date in YYYY/MM/DD format ie. Today will be 2009/05/19.
Watch the program work.

It will do each race in chronological order and create a new tab for each race. It is not 100% in that after all races are put in it will create a blank tab for each meeting. If someone can fix that, happy days.

The next day if you want to start again, simply delete every tab created leaving the Main, Horse and Table tabs in place. To do this simply select the first tab after the Table tab then while holding shift down click on the last tab. Then right click and select delete. Then save the sheet and start again.

If anyone has got a good system that could be improved by automation, post it up here and I will see if I can make it better.

Cheers.

Shaun 19th May 2009 10:52 AM

I have seen this sheet before, but never the attached macro

kennedy22384 19th May 2009 11:13 AM

Yeah, all I did was automate it as best as I could. Just run it before the start of the race day and watch it in action.

The only thing is the prizemoney change from the last race I cant get automatically.

Shaun 19th May 2009 11:21 AM

Are you only able to get information from Unitab site, i know a few people that would like it from a couple of others.

kennedy22384 19th May 2009 11:22 AM

Yeah, Unitab is the one stable website I can get the information from. I cant seem to get it elsewhere. tabcorp has made life difficult for everyone else.

Shaun 19th May 2009 11:31 AM

How about some of the bookie sites, i can list a couple maybe you could see if it is possible to get some info, i know the main thing that is needed is the opening prices.

International All Sports
Betchoice

Brendon 19th May 2009 12:19 PM

Sparky12,

post the link and I will have a go.

kennedy22384 19th May 2009 12:47 PM

I can get opening prices from IAS bet but the page does not provide me with enough data to do the ratings method. I can set something up which will simply grab the next race from each meeting and present it in their own tab. Check back with me in a few hours. :)

Brendon 19th May 2009 01:01 PM

Quote:
Originally Posted by kennedy22384
I can get opening prices from IAS bet but the page does not provide me with enough data to do the ratings method. I can set something up which will simply grab the next race from each meeting and present it in their own tab. Check back with me in a few hours. :)
'K.

When you say "opening prices" you mean prices from a particular time, say 10.30 am on the day, right?

BTW, tried your excel program. Superb!

Pauls123 19th May 2009 04:15 PM

Hi Kennedy

What am I doing wrong here. I cant see anywhere to insert the date. Or maybe mine didnt open up correctly,...hmmm?

Paul

Shaun 19th May 2009 04:26 PM

You mayneed to activate macros,


after you have saved the excel file open it then click on "Tools" then "Options" go to the tab "Security" then look for "Macro Security" set it to "Medium"

When you are back on the sheet hit
Press Alt-F8 to bring up the macros window
Select Method260 and press run
Enter the date in YYYY/MM/DD format ie. Today will be 2009/05/19

Pauls123 19th May 2009 08:30 PM

Help..! I have done all that and it works, but how do I get the fields up again..?
They seem to have all vanished somewhere.

Paul

Shaun 19th May 2009 09:02 PM

Do you see the Tabs at the bottom of the excel doc, each one is a race.

wise one 19th May 2009 09:55 PM

1 Attachment(s)
I have a xcel spreedsheet that I got a few years back from someone in this forum ( my apoligies for not remembering who ) This works on the Unitab site, but because they have change the layout of the second page it does not collect the data from there. ( you need to have a untab acct to get the detailed form history that this picks up ) So if someone out there can fix this and return it to me I would be very grateful.

This will not only collect data for todays races but for last month and the the 2 previous years.

In the options tab at the top click on "enable content"
Click in the purple and yellow boxes selecting "day, month , year , track "
Leave on race 01
If you want just 1 day click on the "get data day " and watch the numbers in race number move.
If you want raw data without scratching removed click on the "data" at the bottom and you can copy and paste
If you want the scratching removed click on the "blue" tab
If you want a whole month click on "get data month" tab it will however remove scratching automatically once it has collected the data
Once again is some can correct this so it collects the data of the last 3 race results it would be muchly appreciated

Wise One

kennedy22384 19th May 2009 10:31 PM

Quote:
Originally Posted by Brendon
'K.

When you say "opening prices" you mean prices from a particular time, say 10.30 am on the day, right?

BTW, tried your excel program. Superb!


The opening prices on IAS only appear after the previous race is run.

kennedy22384 19th May 2009 10:41 PM

Quote:
Originally Posted by wise one
I have a xcel spreedsheet that I got a few years back from someone in this forum ( my apoligies for not remembering who ) This works on the Unitab site, but because they have change the layout of the second page it does not collect the data from there. ( you need to have a untab acct to get the detailed form history that this picks up ) So if someone out there can fix this and return it to me I would be very grateful.

This will not only collect data for todays races but for last month and the the 2 previous years.

In the options tab at the top click on "enable content"
Click in the purple and yellow boxes selecting "day, month , year , track "
Leave on race 01
If you want just 1 day click on the "get data day " and watch the numbers in race number move.
If you want raw data without scratching removed click on the "data" at the bottom and you can copy and paste
If you want the scratching removed click on the "blue" tab
If you want a whole month click on "get data month" tab it will however remove scratching automatically once it has collected the data
Once again is some can correct this so it collects the data of the last 3 race results it would be muchly appreciated

Wise One


Spreadsheet looks very interesting. Let me take a look at it.

It is simply a data mining spreadsheet to put together form and data so users can test their systems. I am a bit bust atm with work but when I get the time, i will be able to come up with something pretty good

wise one 19th May 2009 11:15 PM

The person that supplied me with this was OZDOC

I haven't been around for awhile so I'm not too sure if he/she still posts here or maybe use a different nic

Wise One

kennedy22384 20th May 2009 06:11 PM

Ok, I worked today on making an improvement on OZDOC's spreadsheet.
I decided that one meeting for a month was just not enough.
I think every race meeting going back to the beginning of 2008 should suffice.
I have come up with a way to extract each horse's last 3 starts data from UNItab. It doesnt show 4th or worse just unplaced, but i have been able to put in days since last start, barrier, weight etc.

I am just testing it out now and I will release this when I am happy. All I would like now is some systems to test to see if they are good or not.

wise one 20th May 2009 06:20 PM

you can email me I can can send you some old data

owllieathotmaildotcom

wise one

kennedy22384 20th May 2009 06:33 PM

Nah, thats cool, all I need right now is some systems people want tested out.

I have been able to sort out dead heats which ozdoc did not

wise one 20th May 2009 06:43 PM

could you send it too me me so as I can test it out

Thanks

Wise One

kennedy22384 20th May 2009 07:34 PM

I havent included code to remove the scratchings. Just filter all the scratchings and delete it when it is finished.

kennedy22384 20th May 2009 07:53 PM

Found some issues with it. Still needs work


All times are GMT +10. The time now is 11:35 PM.

Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.