What version of Excel? I did it in 2010 but would think it should be ok in others.
The other thing you can do is record a macro that selects the data set and does the sort. Then copy that macro and copy it into the code provided here
replacing the MsgBox line.
That way you will have the right code for doing the sort and by building it yourself on your spreadsheet it should bypass any issues (that was how I created it in the first place).
PS - failing that I can send you contact details and you could send me the spreadsheet and I could check it out and see if I can see where the problem is.
Edited by ian72 (Thu 15-May-14 17:01:13)