Excel Macros for beginners - where do I start

Please post any questions regarding the program here.

Moderator: 2020vision

Excel Macros for beginners - where do I start

Postby methodman » Thu Feb 01, 2007 11:27 am

I would like to record the prices on offer at regular intervals before the off to identrify late drifters/steamers and expect that I need to use Macros to copy the cells and store the data elswhere (perhaps a 2nd worksheet). I have no idea where to start with Macros so if anybody knows of a good resource for learning the basics of writing Macros. A site with an idiots guide perhaps! Could they please point me in the right direction. Any help would be much appreciated.

Thank you

John
methodman
 
Posts: 119
Joined: Thu Mar 09, 2006 11:06 am

Postby GeorgeUK » Thu Feb 01, 2007 1:00 pm

For most excel stuff, you can try the message board at mrexcel.com
Use the search facility and you should be able to find just about anything.

For learning the basics of macros, you can start by recording them, then looking at the code this produces.
Goto tools > macro > record new macro
try doing some suff on the spreadsheet like copying, pasting and entering data etc
Goto tools > macro > stop recording
Goto tools > macro > open the VB editor and see what you have done in code form.
It's pretty easy to follow once you get into it.
previously known as Gaseous (on the betfair forum)
User avatar
GeorgeUK
 
Posts: 315
Joined: Sat Nov 19, 2005 10:18 pm
Location: Scotland

Postby excel_toy » Thu Feb 01, 2007 4:28 pm

I echo GeorgeUKs answer.

There are also many other sites with superb resources for excel.

Have a look at the mvp site

http://www.mvps.org/links.html#Excel

for a wealth of links

excel_toy
excel_toy
 
Posts: 20
Joined: Tue Jan 30, 2007 2:13 pm
Location: West Mids

Postby methodman » Thu Feb 01, 2007 10:35 pm

Thanks guys thats been really useful.

I have now written the macros to copy the cell values but have not yet found out how to trigger the macros based on cell values.

If anybody can tell me how to conditionally run a macro that would be great.

Thanks again

John
methodman
 
Posts: 119
Joined: Thu Mar 09, 2006 11:06 am

Postby GeorgeUK » Wed Feb 07, 2007 11:37 am

There are a few dofferent typed of macros - more to do with events.

The basic macro is in a module - that is probably what you have done so far.
You can also write code for the worksheet, which will run the code or call macros to run when a specified event happens on the worksheet.
And the same is possible for writing code for the workbook. Workbook events are usually actioned when opening or closing the workbook.

What you will probably need to look at are worksheet_change events. Try doing a search here or in the other places mentiond for that.

eg if a cell in column F < 3, run macro "steamer"

This would get checked every time a change occurred on the worksheet you put the code in or called your macro from.
previously known as Gaseous (on the betfair forum)
User avatar
GeorgeUK
 
Posts: 315
Joined: Sat Nov 19, 2005 10:18 pm
Location: Scotland

Postby methodman » Sat Feb 17, 2007 6:26 pm

I did eventually get my code working but it didn't make any money so back to the drawing board.

Thanks for all your help.
methodman
 
Posts: 119
Joined: Thu Mar 09, 2006 11:06 am


Return to Help

Who is online

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