Hello everyone
I am stuck of the use of the SUMPRODUCT in VBA
I have this formula
And I used variables for ranges :=SUMPRODUCT((SH!$D$12:$D$22="Male")*(SH!$E$12:$E$22=1))
rGender = SH!$D$12:$D$22
rGrade =SH!$E$12:$E$22
When I tried this line it failed
Any help please ....MsgBox Application.WorksheetFunction.SumProduct(rGender, strMale, rGrade, grade)