Reputation: 121
I have a Custom List made which contains Numbers only and when I try to sort the Data's using the Custom List, it simply sorts the Data's in Ascending/Descending order and does not sort based on the arrangement of Custom List. How do we sort the data using a Custom List containing Numbers only.
The idea that i came up with is to add a string to the Custom List data as well as data that need to be sorted and then sort it. Is it possible to sort data's without changing/adding anything in worksheet ?
Upvotes: 0
Views: 231
Reputation: 11
Not sure if the rows.count is syntax right, but something along the lines of:
'Sort range "rng1" (eg. A4:X100) by descending Range A'
rng1.Sort key1:=Range("A4:A" & Rows.Count), Order1:=xlDescending
'or other option Order1:=xlAscending'
Upvotes: 1