Sub sort_columnsIndividually()
' ~~ Sort columns individually
' https://www.extendoffice.com/documents/excel/4265-excel-sort-multiple-columns-independently.html
'Updateby Extendoffice 20161123
Dim sht As Worksheet
Set sht = ActiveSheet
Dim rng As Range, _
rngUsed As Range
Set rngUsed = Application.InputBox(Prompt:="Select range for individual column sort", Type:=8)
Dim lngHdr As Long
lngHdr = MsgBox("Does your selection contain headers", vbYesNo)
lngHdr = lngHdr - 5 ' ~~ Converts vbYesNo to xlYesNo
Application.ScreenUpdating = False
For Each rng In rngUsed.Columns
rng.RemoveDuplicates Columns:=1, Header:=lngHdr
With sht.Sort
.SortFields.Clear
.SortFields.Add key:=rng, Order:=xlAscending
.SetRange sht.Range(rng, rng.End(xlDown))
.Header = lngHdr
.MatchCase = False
.Apply
End With
Next rng
Application.ScreenUpdating = True
End Sub