Hi
Personally, I wouldn't have the buttons attached to the QAT. On there they are very small and can be difficult to distinguish.
The buttons would really only be applicable to that particular sheet anyway, so I prefer having the buttons on the sheet as in the attached file.
In this file, I copied just one sheet of your data to a sheet called Data.
I had to insert a new column at C, and convert your US dates to UK dates for the sort to work correctly for me.
You can delete that column, and just change Range("C4") to Range("B4") in the macro code, and of course I4 will become H4 and G4 will become F4
I inserted a few rows at the top of the screen and placed 3 buttons there, title up appropriately and attached the three macros to the buttons.
At the end of the macro, it writes the Sort order to cell H2 for easy viewing of the current Sort sate.
Below I just show the Sort 1 for the Date, Time and Event sort, but the others are identical aprt form the choice of sort column and the message in H2 at the finish
Hope this helps
Sub Sort1()
' Date, Time, Event
Dim lr As Long
Dim myData As Range
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Data")
lr = Cells(Rows.Count, 1).End(xlUp).Row
Set myData = Sheets("Data").Range("A4:K" & lr)
With ws
.Sort.SortFields.Clear
.Sort.SortFields.Add Key:=Range("C4"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
.Sort.SortFields.Add Key:=Range("I4"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.Sort.SortFields.Add Key:=Range("G4"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ws.Sort
.SetRange myData
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
.Range("H2") = "Data sorted by Date, Time and Event"
End With
End Sub
Bookmarks