macro with SUMPRODUCT help
for i = 7 to 10
cnt = Evaluate("SUMPRODUCT((Detail!$D$7:$D$500" & _
"=""Offender Missed Call(STaR)"")*(Detail!$B$7:$B$500=Summary!$A$" & _
i & "))"
Worksheets("Summary").Cells(i,"I").Value = cnt
Next i
--
Regards,
Tom Ogilvy
wrote in message
ps.com...
Heeey :)
ok i created a formula in my excel sheet that will do what i need, but
now i guess my question will be this how can i make this formula
through macro and i dont want just to add
a formula to my cell as i read somewhere it can be done like this
ActiveCell.FormulaR1C1Local = "=SUMPRODUCT((C1:C10 = 1)*(D1:D10
="another criteria"))"
that wouldnt work for me, i would want this formula to be added through
macro
My formula:
=SUMPRODUCT((Detail!$D$7:$D$500="Offender Missed Call
(STaR)")*(Detail!$B$7:$B$500=Summary!$A$7))
because i would need to program cell A7 to add 1every time, so once it
will be in the loop it ill be than A8, a9, a10 and so on, i know how to
do that part :) but i have no idea on how to use sumproduct through
macro proper way, thanks
|