I want a button to complete a range of steps within an Excel workbook to get it in a suitable place for upload. I need to sort data, newest to oldest, within the Date column after completing a filter, delete, remove filter steps.
Sub All_Steps ()
'Filters Closed Incomplete and Closed Skipped within the state column
Worksheets("Update Template").Range("A1:E15000").AutoFilter Field:=5, Criteria1:="Closed Incomplete", Operator:=xlOr, Criteria2:="Closed Skipped"
'Deletes Closed Incomplete and Closed Skipped filtered rows
Application.DisplayAlerts = False
Worksheets("Update Template").Range("A2:E15000").SpecialCells(xlCellTypeVisible).Delete
Application.DisplayAlerts = True
'Removes filter
Worksheets("Update Template").ShowAllData
'Updates DD-MM-YYYY HH:MM:SS date format to permissible DD/MM/YYY
Worksheets("Update Template").Range("D2:D30000").NumberFormat = "DD/MM/YYY"
End Sub
The code I've tried for sorting:
Worksheets("Update Template").Range("A1:E15000", Range("A1:E15000").End(xlDown)).Sort Key1:=Range("D1"), Order1:=xlAscending, Header:=xlYes

Key1:=Range("D1)should beKey1:=Range("D1").