mixing of vba and sumproduct
You rock!
thanks!
J
"Bernie Deitrick" wrote:
J,
For your example:
Application.Evaluate("SumProduct((OrderMonthName=B 1)*1)")
For your code:
tot = tot + Application.Evaluate("SumProduct((OrderMonthName= """ _
& MonthName(m) & """)*1)")
HTH,
Bernie
MS Excel MVP
"Gixxer_J_97" wrote in message
...
hi all,
i would like to use vba and the sumproduct function
the excel formula version would be something like
=SumProduct((OrderMonthName=B1)*1)
i am trying
with sheets("Sheet1")
tot = tot + cdbl(Application.SumProduct((.Range("OrderMonthNam e") =
monthName(m))*1))
end with
but i am getting a type mismatch - i have a feeling i am using this
incorrectly.
any help?
tia!
J
|