Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
With ActiveCell
If Intersect(.Cells, [A1:D1]) Is Nothing Then Exit Sub
Cancel = True
.CurrentRegion.Sort .Cells, IIf(Cells(Application.CountA(.EntireColumn), .Column) < .Cells(2), 1, 2), Header:=xlYes
End With
End Sub