Here is my code :
Sub SortCol()
With Application
.AddCustomList listArray:=Array("P9:P16")
x = .CustomListCount
Range("A9:N16").Sort Key1:=Range("A9"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=x, MatchCase:=False, Orientation:=xlTopToBottom
.DeleteCustomList ListNum:=x + 1
End With
End Sub
Cell range A9:N16 are the data to be sorted. P9:P16 is a custom list containing number (i.e. 1 ,2 ,3 ,5 ,7 ,9 ,8 ,6).
The code doesn't work , any idea?
from KH
Sub SortCol()
With Application
.AddCustomList listArray:=Array("P9:P16")
x = .CustomListCount
Range("A9:N16").Sort Key1:=Range("A9"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=x, MatchCase:=False, Orientation:=xlTopToBottom
.DeleteCustomList ListNum:=x + 1
End With
End Sub
Cell range A9:N16 are the data to be sorted. P9:P16 is a custom list containing number (i.e. 1 ,2 ,3 ,5 ,7 ,9 ,8 ,6).
The code doesn't work , any idea?
from KH