الى الاستاذ طارق
اسمح لى بأننى أضفت تعديل بسيط فى الكود لكى يعمل بالصورة المطلوبة
Sub ConvertFunction()
Dim H, B, C, J, K, M As Range
With Sheet1
Set H = .Range("H:H"): Set B = .Range("B:B")
Set C = .Range("C:C"): Set J = .Range("J:J")
Set K = .Range("K:K"): Set M = .Range("M:M")
End With
LR = [b65536].End(xlUp).Row
If LR <= 5 Then MsgBox "No data to retreive": Exit Sub
For r = 5 To LR
cl = Cells(r, 2)
cr1 = [">="&C1]: cr2 = ["<="&C2]
cr3 = [">="&G1]: cr4 = ["<="&G2]
Cells(r, 3) = WorksheetFunction.SumIfs(H, B, cl, C, cr1, C, cr2)
Cells(r, 4) = WorksheetFunction.SumIfs(J, B, cl, C, cr1, C, cr2)
Cells(r, 6) = WorksheetFunction.SumIfs(K, B, cl, C, cr1, C, cr4)
Cells(r, 7) = WorksheetFunction.SumIfs(M, B, cl, C, cr1, C, cr4)
Next
End Sub