I have some VBA code in Excel which is supposed to carry out a few calculations and then sort the results in descending order using a VBA macro, then copy the results table to another part of the worksheet (the part that the user can see).

This was working fine until I decided I wanted to hide the results list (the one that is sorted, not the one that the user sees) so that no-one can interfere with it. When I hide the rows, however, it seems as though Excel can no longer sort them. It doesn't produce any errors but the list just remains unsorted.

Is this a fault with my version of Excel or just a limitation of Excel itself? Can't it sort a list using VBA code if it is contained in cells that are hidden?

Thanks
-Rob