I am implementing a Pareto chart for versions of Excel that are olcer than the 2016 version, so I am copying the Pareto values to a 'helper table' and using VBA's sort operations to order the data in descending order of frequency. And everything works fine when I manually run the macros that sort the data for two Pareto charts.
The problem is that, when I use VBA to run the macros, the sort operation appears to not occur. However, the copy operation still occurs. Also, if I move the copy/sort commands from inside the macro to userform1, the sort operation does not occur.
I am stymied on how the sort can work when I run the macro manually, yet fail when userform1 runs the same macros. Does anyone know how to corect this behavior so that the numbers in the below graphic are sorted into descending order?
Untitled.png
The file is attached.
Bookmarks