Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom function for Sum Product (Conditional Formula)
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! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom function for Sum Product (Conditional Formula)
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! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum Product Function Maybe | Excel Worksheet Functions | |||
Conditional Sum Product | Excel Discussion (Misc queries) | |||
Custom function to simplify Index(match)) formula | Excel Discussion (Misc queries) | |||
product function | Excel Worksheet Functions | |||
product function | Excel Worksheet Functions |