Hello,
I wrote a function which is using SumProduct.
a is a worksheet range
b is a worksheet cell
c is a worksheet range
Function cond_average(a, b, c)
If Application.SumProduct(--(a = b), --(c <> "")) = 0 Then
cond_average = -1
Else
cond_average = Application.SumIf(a, b, c) / Application.CountIf(a,
b)
End If
End Function
Sumif and CountIf functions works but SumProduct returns error.
What is wrong ?
thank you
Gil D.
Bookmarks