I have a sheet that I want to auto sort the cell range A13-T33 by column M descending when a cell in column M is updated.
I have tried:
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("M:M")) Is Nothing Then
Range("M13").Sort Key1:=Range("M33"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
'End Sub</code>
I cannot get it to work.
I have tried:
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("M:M")) Is Nothing Then
Range("M13").Sort Key1:=Range("M33"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
'End Sub</code>
I cannot get it to work.