I have code that is doing a filter. it works great. I would now like to sort the first column in ascending order. I have tried the following but it does not work. The code in red is the part that is not working.
If Target.Range.Address = "$C$4" Then
'MsgBox LastCell
With Sheets("PAR Where is it")
LastCell = .Cells(.Rows.Count, "L").End(xlUp).Row
ActiveSheet.Range("A1:L" & LastCell).AutoFilter Field:=12, Criteria1:=">5", Operator:=XlAutoFilterOperator.xlAnd, Criteria2:="<=10"
ActiveSheet.Range("A1:L" & LastCell).AutoFilter Field:=2, Criteria1:="MABST"
ActiveSheet.AutoFilter.Sort.SortFields.Add(Key:=sheet.Range("A1:A" & LastCell), SortOn:=XlSortOn.xlSortOnValues, Order:=XlSortOrder.xlAscending, DataOption:=xlSortDataOption.xlSortNormal)
End With
End If
Bookmarks