View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
smartin smartin is offline
external usenet poster
 
Posts: 915
Default average with 2 criteria

hockeyb9 wrote:
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


How about a pivot table? Select columns I:L (assuming there is some
extraneous data in J), create the pivot table.

Drag Status to the row area.

Drag Financed By to the column area.

Drag Days Aged to the data area. Double click the button this creates
and change Summarize by: to Average

No muss, no fuss.