title: Custom Sort on Range VBA
body: <p>I wish to carry out a custom sort on a selected range at the very end of some standard sorts. So first we sort the range "C", then "R", then "G" and finally I wish to sort on status- which is the custom sort part. But this is going very wrong. I am aware I need a List array aside from that I am unsure how to go about this...please help!</p>
  
  <pre><code>      Dim keyRange(1 To 5) As String
        keyRange(1) = "L-2sd"
        keyRange(2) = "L-1sd"
        keyRange(3) = "P"
        keyRange(4) = "U+1sd"
        keyRange(5) = "U+2sd"
  
  
        Application.AddCustomList ListArray:=keyRange
        sortNum = Application.CustomListCount
  
           'Dim sortNum As Long
         ThisWorkbook.Sheets("Order").Activate
         ThisWorkbook.Sheets("Order").Range("A1:" &amp; Letter &amp; 10000).Select
         Selection.Sort key1:=Range("C"), Order1:=xlAscending,key2:=Range("R"), order2:=xlAscending, key3:=Range("G"), order3:=xlAscending, 
  
        key4:=Range("status"), Order1:=xlAscending, OrderCustom:=Application.CustomListCount + 1
  </code></pre>