Custom function for Sum Product (Conditional Formula)
THANX BOB!!!!!!!!!!!!!
U really made my problems solved!
I am really sorry for double posting but I was actually receiving no
response and had presumed that it might have been overlooked!
Thanx again buddy!
"Bob Phillips" wrote:
Public Function MyFormula(ARRAY1, ARRAY2, ARRAY3, sSTRING)
MyFormula = Application.Caller.Parent.Evaluate( _
"SUMPRODUCT(--(" & ARRAY1.Address & "=""" & sSTRING & """),--(" & _
ARRAY2.Address & "0)," & ARRAY3.Address & ")")
End Function
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"FARAZ QURESHI" wrote in message
...
I want to create a custom function like:
Public Function MyFormula(ARRAY1, ARRAY2, ARRAY3, STRING)
MyFormula=SUMPRODUCT(--(ARRAY1=STRING),--(ARRAY20),ARRAY3)
End Function
How to give it a correct and complete form?
Thanx!
|