View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dkingston dkingston is offline
external usenet poster
 
Posts: 11
Default weighted avg. of groups in table

i have a table with group #s in column A and values in column B.
i am using the formula below to calculate the average value (ignoring nulls)
of the relevant group on each row.
if i add a weighting in C1:C10 how do i calculate the weighted average of
each group?

=SUM(SUMIF(A1:A10,A1,B1:B10))/SUMPRODUCT((A1:A10=A1)*(B1:B10<""))

thanks in advance for your time.
DK