I'd like to build a model, just like the one that can be found on the following link: http://www.football-data.co.uk/ratings.pdf but with a few transformations to get more accurate findings. However, I don't know how to program it on excel.

Basically what I intent to do is the following: imagine it's the fixture 17 of the EPL and Arsenal is playing home to Tottenham. I want to calculate the difference between the goal margin of the previous x games of the home team (Arsenal) with the goal margin of the previous x games of the away team (Tottenham), so if it were a 4 game margin, I'd calculate the goal margin of Arsenal in the 4 previous games minus Tottenham's goal margin in the 4 previous games and get a final number. Afterwards, I want to register the % amount of times it ends in either a home victory, draw or away victory for each difference of goal margins. After this I want to make a regression to estimate the average probability of each event for each margin, basically like the Sportsbooks do (but this part is quite straight forward).

Can someone make a macro to automate this? I'm attaching the season of the EPL in 93-94, but I'll also do it for the other following seasons till last year's season.

Thank you very much

93-94.xlsx 93-94x.xlsx