Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
CUSTOM FUNCTION DESIRED
Hello every1!
Can anyone devise me a piece of code to formulate a custom function like: MyRate(Array1,Array2,Criteria) To work for a function like: =SUMPRODUCT(--(A1:A20="A"),B1:B20,C1:C20)/SUMPRODUCT(--(A1:A20="A"),B1:B20) As: MyRate(A1:A20,B1:B20,"A") All your assistance and expertise shall be highly obliged. Thanx in advance!!! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
CUSTOM FUNCTION DESIRED
How do you intend to pass the C1:C20 part of the argument?
On Nov 26, 1:28 pm, FARAZ QURESHI wrote: Hello every1! Can anyone devise me a piece of code to formulate a custom function like: MyRate(Array1,Array2,Criteria) To work for a function like: =SUMPRODUCT(--(A1:A20="A"),B1:B20,C1:C20)/SUMPRODUCT(--(A1:A20="A"),B1:B20) As: MyRate(A1:A20,B1:B20,"A") All your assistance and expertise shall be highly obliged. Thanx in advance!!! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
CUSTOM FUNCTION DESIRED
U R quite right Iliace!
Sorry 4 replying late but I was bz in my exams. How can u devise a custom function like: MyRate(A1:A20,B1:B20,C1:C20,"A") "iliace" wrote: How do you intend to pass the C1:C20 part of the argument? On Nov 26, 1:28 pm, FARAZ QURESHI wrote: Hello every1! Can anyone devise me a piece of code to formulate a custom function like: MyRate(Array1,Array2,Criteria) To work for a function like: =SUMPRODUCT(--(A1:A20="A"),B1:B20,C1:C20)/SUMPRODUCT(--(A1:A20="A"),B1:B20) As: MyRate(A1:A20,B1:B20,"A") All your assistance and expertise shall be highly obliged. Thanx in advance!!! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
CUSTOM FUNCTION DESIRED
Hello,
If I understand you correctly you need an AVERAGEIF function: http://www.bettersolutions.com/excel...E725811811.htm Regards, Bernd |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
CUSTOM FUNCTION DESIRED
Thanx Bernd,
An xclent site recommendation, 4 sure!!! But! it is actually the code for usage of conditional Sumproduct( ) that I require! Just want to know how can I it! Any sample code would be tremendously helpful! If u could refer 2 me such another sample for the usage of "sumproduct(--(xyz))"? Thanx again pal!!! "Bernd P" wrote: Hello, If I understand you correctly you need an AVERAGEIF function: http://www.bettersolutions.com/excel...E725811811.htm Regards, Bernd |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
CUSTOM FUNCTION DESIRED
Hello,
Function myrate(rcond, _ rweight, _ rsum, _ scond As String) As Double 'Reverse(moc.liborplus.www) V0.1 Dim i As Long, n As Long, rcomp With Application.WorksheetFunction n = rcond.Count rcomp = rsum For i = 1 To n rcomp(i, 1) = -(rcond(i).Value = scond) Next i myrate = .SumProduct(rcomp, rweight, rsum) / _ .SumProduct(rcomp, rweight) End With End Function Regards, Bernd |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
CUSTOM FUNCTION DESIRED
WOW!
THANX PAL! GREAT! Can't find words appropriate enough to express my gratitude! Thanx Again! "FARAZ QURESHI" wrote: Hello every1! Can anyone devise me a piece of code to formulate a custom function like: MyRate(Array1,Array2,Criteria) To work for a function like: =SUMPRODUCT(--(A1:A20="A"),B1:B20,C1:C20)/SUMPRODUCT(--(A1:A20="A"),B1:B20) As: MyRate(A1:A20,B1:B20,"A") All your assistance and expertise shall be highly obliged. Thanx in advance!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
which function can get the desired result? | Excel Worksheet Functions | |||
IRR desired return | Excel Worksheet Functions | |||
Simplicity is Desired | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Linking across worksheets not working as desired | Excel Worksheet Functions |