تم التعديل
Option Explicit
Sub Salim_Index()
Application.ScreenUpdating = False
Dim S_sh As Worksheet: Set S_sh = Sheets("الدرجات")
Dim Index_sh As Worksheet: Set Index_sh = Sheets("قائمة")
If ActiveSheet.Name <> Index_sh.Name Then GoTo Leave_Me_Out
Dim my_st1$, my_st2$, my_st3$
Dim lr%: lr = S_sh.Cells(Rows.Count, 1).End(3).Row
Dim Flt_Rg As Range: Set Flt_Rg = S_sh.Range("a4:R" & lr)
Index_sh.Range("b5:c150").ClearContents
my_st1 = "=" & Index_sh.[j1]
my_st2 = "=" & Index_sh.[j2]
my_st3 = Replace(Index_sh.[j3], "*", "")
my_st3 = "*" & my_st3 & "*"
Flt_Rg.AutoFilter Field:=13, Criteria1:=my_st1
Flt_Rg.AutoFilter Field:=4, Criteria1:=my_st2
Flt_Rg.AutoFilter Field:=15, Criteria1:= _
"=" & my_st3, Operator:=xlAnd
'===========================
Flt_Rg.Columns(2).SpecialCells(xlCellTypeVisible).Copy
Index_sh.Range("b4").PasteSpecial Paste:=xlPasteValues
Flt_Rg.Columns(3).SpecialCells(xlCellTypeVisible).Copy
Index_sh.Range("c4").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Flt_Rg.AutoFilter
Leave_Me_Out:
Application.ScreenUpdating = True
End Sub
الملف
filter by 3 Criterias_Modifier.xlsm