Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You will need to reverse the arguments, and dec places will be mandatory
Function mySP(dec As Long, ParamArray rng()) Dim sRanges As String Dim i As Long For i = LBound(rng) To UBound(rng) sRanges = sRanges & rng(i).Address(, , , True) & "*" Next i mySP = Evaluate("=SumProduct(Round(" & _ Left(sRanges, Len(sRanges) - 1) & "," & dec & "))") End Function Use like =mySP(2, A1:A100,B1:B100,C1:K100) -- --- HTH Bob (change the xxxx to gmail if mailing direct) "dribler2" wrote in message ... I gain a UDF fed thru another post and this works for something like this =mySP(A1:A100,C1:K100,2) [2 dimensional with one and a series of factors] '------------------------------------------------ Function mySP(rng1 As Range, rng2 As Range, Optional dec As Long = 15) mySP = Evaluate("=SumProduct(Round(" & rng1.Address(, , , True) & "*" & rng2.Address(, , , True) & "," & dec & "))") End Function '----------------------------------------------- Yet I need to know if it is still possible to move more farther with something like this =mySP(A1:A100,B1:B100,C1:K100,2) ---the above current UDF gaves me a #VALUE! for a 3 or more dimensional with a max. series of factors. hope someone out there can understand to help me with this... happy holidays, dribler2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Look up with 2 factors | Excel Worksheet Functions | |||
if senerios with 2 factors | Excel Discussion (Misc queries) | |||
ANOVA with two factors | Excel Worksheet Functions | |||
Multiply one value by many factors | Excel Worksheet Functions | |||
Seasonal factors | Excel Programming |