I am looking for some help in creating a football match simulator in Excel.
To set the scene here, I already use Excel to simulate the English Football League and cups largely based on the old dice game called Logacta. This initially started as a test project to design and football league table that automatically updated, with teams moving up and down the league as the scores changed. I achieved this using the RANK and VLOOKUP function and the project has mushroomed from there. I started by using the actual dice but found that restrictive and used the RANDBETWEEN function in Excel to simulate the dice options and then hit F9 to run each match result.
What do I want it to do?
What I want to do now is create and Excel sheet which goes into a bit more detail for each game and plays multiple games simultaneously at the touch of a button. Added into this, I need to able able to select a form factor for each team. So, like in Logacta where you choose a dice which would be more favourable to one team or the other based on their league position / points. I know the equations for this, as I have a tried and tested formula which works.
Ideally, I want it to be able to see the events (shots, penalties, maybe possession) for each game. My thought would be to have 180 events for each game (one event for every half minute). In effect, this would be Excel running a loop on a RANDBETWEEN type function and returning something like (shot, penalty, or possession). I have in essence done this but want to be able to have a time delay between each event and to have a button where I can start and stop a game without having hit F9 every time I want a new event to happen.
When Excel hit the ‘shot’ or ‘penalty’ option, it would then need to go to a sub RANDBETWEEN which would have other options ‘shot’ = (missed, saved, hit the post, shot blocked and GOAL!); ‘penalty’ (missed or GOAL!). I would need to control the first RANDBETWEEN function by the form of the team, so there would need to be say 6 options (i.e. the better team would be more likely to have more ‘shots’ or ‘penalties’)
I think I would be able to achieve this by designing a MACRO, but I am not sure quite how to achieve it?
What do I want it to look like?
Visually, it probably needs to look like a vide-printer or Sky Sports Soccer Saturday look. Either way, I need to be able to link it to the live league table on a separate Excel sheet, so as each goal goes in at simultaneous matches, I can see the changes.
What else?
I also want to able to run the same MACRO or sheet to play cup games, so I would need to factor in extra-time and penalty shoot-outs. Having said that, I designed my game where the penalty shoot out is done at 90 minutes and the winner holds an advantage in a golden goal extra time. So, if there are no goals in extra time, the winner of the penalty shoot out after 90 minutes wins the game. If either team scores in extra-time, then they win on the golden goal rule.
Any help or pointers in the right direction will be greatly appreciated here. I am actually doing an Excel course on MACRO’s, but haven’t come round to finding out how to solve this game query yet.
Bookmarks