بعد الاذن
تم اختصار الكود كما يلي
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
ActiveWorkbook.Worksheets("ورقة3").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("ورقة3").Sort.SortFields.Add Key:=Range("J10:J43") _
, SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("ورقة3").Sort.SortFields.Add Key:=Range("D10:D43") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("ورقة3").Sort
.SetRange Range("C10:Q43")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
شكرا لكم