My way of doing this would be this. Not very efficient, I know, but nothing better comes to mind yet.
Put auto-filters on your data range and filter out scores for 1 team as Home Team, copy/paste that data to another sheet. Remove the auto-filter, then put the filter on Away Team and filter data for the same team. Copy/paste the data to the other sheet. Sort the copied data by date (I have game dates in my custom-made list, not sure about your data, though), and keep the data for the last 5 dates, remove the rest.
After that, I suppose you could tweak the macro you've been using to calculate the necessary results and percentages.
The problem is that this is time consuming, as you would have to filter out data for each team and keep the data seperate, otherwise the macro will provide inaccurate results.
I'll think about this some more, for now this is the best advice I can give. Good luck
Bookmarks