Hi
I have attached a simple example for the question I have.
Basically there is a list of 90 football matches with results. I have split the series of games into 9 match days (column A) and I want to calculate the goal difference of each team going back the previous 2 match days.
For example:
Rows 2 to 21 contains just results but H22, I22 begins to show the goal difference (GD) for each side based on how the teams performed in their previous 2 games. You will see that Bologna won 3-2 (row 5) and lost 1-0 (row 15) in their 2 games, this gives a GD of 0 (won by 1 goal and lost by 1 goal, +1 minus -1)
Entering this manually is easy enough but how would I enter a formula (or VBA) that calculates this value for potentially thousands of rows?
You will see the 2 rows (22 and 23) which shows what the result should be. Bologna's next game (match day 4) should only consider the goal difference from match days 2 and 3, ignoring match day 1 and so on.
Any help will be appreciated!
Thank you
Bookmarks