اخوانى الافاضل
لماذا لا تعمل الدالة داخل الكود وما هى الطريقة الصحيحة لاستخدامها فى الاكواد
Sub saad()
Application.ScreenUpdating = False
On Error Resume Next
Dim a, d, z As Range
ww = Application.WorksheetFunction
Set d = Sheets("saad").Range("c5:c1500")
Set a = Sheets("saad").Range("e5:e1500")
Set z = Sheets("saad").Range("b5:b1500")
Y = Sheets("saad").Cells(Sheets("saad").Rows.Count, Sheets("saad").Range("a5:a1000").Column).End(xlUp).Row
For i = 6 To Y
Cells(i, "c") = ww.SumIfs(a, z, Cells(i, "b"), d, Range("c5:c5"))
Next i
1.rar