average with 2 criteria
What's not working? Though you have an unnecessary ( ), it seems to work
with your formula or either of the following:
=SUMPRODUCT(--($I$1:$I$200="stock"),--($K$1:$K$200="x"),$L$1:$L$200)/SUMPRODUCT(--($I$1:$I$200="stock"),--($K$1:$K$200="x"))
=(SUMPRODUCT(($I$1:$I$200="stock")*($K$1:$K$200="x ")*($L$1:$L$200))/(SUMPRODUCT(($I$1:$I$200="stock")*($K$1:$K$200="x" ))))
Your sample data only has one match and therefore is divided by 1.
HTH,
Paul
--
"hockeyb9" wrote in message
...
i am trying to set up an average days for inventory based on two criteria.
i have set up a calculation to get the number of days aged already, but
can't get a sumproduct formula to work.
ie) columns
i k L
status financed by days aged
stock x 10
customer x 45
stock y 14
customer z 80
customer x 12
i tried
=(SUMPRODUCT(($I$1:$I$200="stock")*($K$1:$K$200="x ")*($L$1:$L$200))/(SUMPRODUCT(($I$1:$I$200="stock")*($K$1:$K$200="x" ))))
to no avail.
anyone have an idea / solution?
thanks
|