Code:
ActiveWorkbook.Worksheets("Sheet2").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet2").AutoFilter.Sort.SortFields.Add Key:=Range _
("AB1:AB97515"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Sheet2").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Referring to sheet 2 and referring to 1-97515 specifically is bad for me.
This is straightup recorded and unedited; it doesn't even work when I run the record.
I've been editing this for over an hour with no solution in sight. I just want to sort column AB by A-Z