Maybe a event macro
code goes in the sheet module instead of a normal module.
Double click the header in Row 1 to run.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Rows(1)) Is Nothing Then
Cancel = True
Application.ScreenUpdating = False
With Target
.CurrentRegion.Sort Key1:=.Offset(1), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
End With
End If
Application.ScreenUpdating = True
End Sub
VBA Noob
Bookmarks