Hi everyone,
I had this code in my spreadsheet and it worked perfectly. For some reason it has stopped working. Does anyone have any suggestions?
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target.Cells, Range("C:C")) Is Nothing Then
Application.ScreenUpdating = False
ActiveWorkbook.Worksheets("Invoice Summary").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Invoice Summary").Sort.SortFields.Add Key:=Range("C6"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Invoice Summary").Sort
.SetRange Range("A6:L1000")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Application.ScreenUpdating = True
End If
End Sub
Thank you
Bookmarks