I have a simple code that works, but Columns "G" and "H" contain DATES (example 01/03/22). (Column B is text range) I want G to sort oldest date to newest date, then H oldest to newest, then B alphabetical.
I am new to VBA, so can someone help me correct this?
Sub SortMultipleColumns()
With ActiveSheet.Sort
.SortFields.Add Key:=Range("G1"), Order:=xlAscending
.SortFields.Add Key:=Range("H1"), Order:=xlAscending
.SortFields.Add Key:=Range("B1"), Order:=xlAscending
.SetRange Range("A1:H1000")
.Header = xlYes
.Apply
End With
End Sub
Please see image of the problem:
Example.JPG
Bookmarks