Hi
I have created a macro to populate the Premiership table with a variety of statistics. Part of the code is supposed to sort the teams based on points, goal difference if points are equal, and goals for if points and goal difference are equal.
However, it won't seem to sort based on goal difference unless I remove the part of the code that sorts based on goals for. The sort code is as follows:
The problem is shown in this picture:
Error1.PNG
As you can see, the order should be Sheffield United, Burnley and then Arsenal because that is the descending order of goal difference. Instead it is sorted in descending order of goals for.
Note also that Tottenham and Man United should also be swapped.
How can I fix this?
Thanks
Bookmarks