On my spreadsheet, E2:E1215 has dates , my vba (produced from recorded macro. its not providing the correct result.
I have searched various posts to do it with vba and all are for very advanced applications of the sort.
Can someone please assist with the basic vba for this
Sub Sort() ActiveWorkbook.Worksheets("Updates").AutoFilter.Sort.SortFields.Clear ActiveWorkbook.Worksheets("Updates").AutoFilter.Sort.SortFields.Add Key:= _ Range("E2:E1215"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _ :=xlSortNormal With ActiveWorkbook.Worksheets("Updates").AutoFilter.Sort .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End Sub