Custom Sort Order

  • I try to sort based upon a custom sort order, which is an array. I populated the custom sort order array from a range of cell values.


    Why can't I just call the name of the array as below?

    Code
    1. CustomOrder:=SortOrderArray

    Each time that I run the VBA Macro, it adds another Custom List. These accumulate and I think that they cause issues. Can I delete all old custom sort lists at the start of a run?


    Why do I need to use Order:=xlAscending? Does this interfere with my use of the Custom List?


  • Would it be easier to just number the items in the SortOrderArray, find the position of each value in in my data in the SortOrderArray and write the numbers to an adjacent column, then sort the entire table based on those numbers? It wouldn't be that tedious and it would add an extra column, but I think that it would make my sort function much more robust.