I'm trying to sort a column where there is a dynamic list.
I've tried numerous ways via the internet, but can't seem to get them to work. I've run this via a Macro but can't seem to clean it up.
Can anyone please help and explain how it works?
I've tried numerous ways via the internet, but can't seem to get them to work. I've run this via a Macro but can't seem to clean it up.
Can anyone please help and explain how it works?
VBA Code:
Columns("C:C").Select
ActiveWorkbook.Worksheets("Validation sheet").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Validation sheet").Sort.SortFields.Add2 Key:=range _
("C2:C36"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Validation sheet").Sort
.SetRange range("C1:C36")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With