The objective of session 4 is to find ‘value’. So far, we’ve imported fixtures to a summary file and generated our own ‘odds’ by transferring each fixture to a model and collating the model outputs.  Now, that’s cool and would save you some time.  But, to find value we need to do more.  In this video, we look at importing real-world odds from a fixture file to compare to our odds, and identify value bets.

This means changing the layout of our main interface (or at least the sheet we interact with most at present) – the Matches sheet in the Summary file.  You might be thinking: Chris, but shouldn’t we have planned for this?  Why are we changing the layout now?  Shouldn’t we fix that at the beginning?

This is a valid point and, perhaps, we should have spent more time planning the file structure and sheet layouts.  At some point, however, you do need to start coding!  Too much planning can risk ‘analysis paralysis’ – doing nothing because the task seems too daunting.  Moreover, new requirements always emerge on Excel development projects: perhaps you’ve already asked yourself, ‘If I can do that, perhaps I could do this too?’  So, although planning is important, it’s normal to adapt the code to a better layout at some point.  That’s what we do in this session.

First, we consider the new requirements – including the need to import real-world odds data from the fixture file.  Then, we quickly sketch out a new column structure and set about adapting the code.  This is a tricky job, no doubt, but it’s made easier by the best practices we have applied so far on the project: informative variable and macro names, comments and annotations and concise routines that are easy-to-understand, among others.  With a steady and systematic approach, the revisions are actually straightforward.  Remember to test as you go through, too – don’t leave all the testing until the end!

In the process, we touch on some high-level discussions.  The revised code contains some repeated structures – might we be able to avoid these?  It’s possible with a more sophisticated data transfer mechanism which, though not necessary for the project, would streamline the code.  Though the current approach works well, it’s a practical rather than ideal solution.  Let me know in the comments below the video if you’d like me to explore this further in this series.  Onwards!

Topics and Techniques

  • Restructuring a spreadsheet
  • Range(range,range) concept
  • Offset method
  • Round function in VBA
  • Message box
  • Repeated structures in Excel VB
  • Data transfer techniques