In this session, we deal with the next stage of the weekend process: picking out bets which meet one or more criteria, based on the analysis we’ve done so far.  If you spend time filtering Excel to find ‘value’, this session could be for you.  We’ll try to get it done at the click of a button with Excel VBA.

We attempt to programme VBA to ‘pick out’ candidate bets according to one or more criteria which form a ‘system’.  A common criteria is to compare your odds with real-world odds to find ‘value’, and to select bets above a value threshold.  How can we do this with VBA?  We set things up in a flexible way so you can input new systems and tweak existing ones.

Though the code is not simple, it’s nothing we haven’t seen before in this series.  So, it’s a great chance to consolidated previous learning.  The usual suspects make it into the new routine: a loop through systems, then another through the day’s matches, two conditional statements to check criteria and variables to help along the way by storing helpful information.  As usual, we ‘step through’ the code in the VBA editor and call on Msgbox to help us understand what’s going on.

We make good progress with this stage of the process and should complete it in the next session.  But, don’t wait for us – see if you can complete it yourself in the meantime!

Topics and Techniques

  • Loop through a range of cells
  • Loop within loop
  • If statement
  • If statement – multiple criteria
  • Named ranges
  • String variable
  • Integer variable
  • Double variable
  • With … End With
  • Testing VBA code with Msgbox