Hello,
I have a table where the values inputted in column A effect column T. I tried to write a Macro that sorts the table by column T when values in column A are changed. The macro doesn't work. How can I fix the macro?
This is what I wrote.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("A7:A33")) Is Nothing Then
Range("A7:T33").Sort Key1:=Range("T7"), _
Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
End Sub
Bookmarks