View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dave F[_2_] Dave F[_2_] is offline
external usenet poster
 
Posts: 187
Default AVERAGE & SUMPRODUCT

I'm trying to calculate an average of a series of numbers, which
numbers are within a range. Not all members of the range should be
included in the average calculation, however.

I have the following:

=SUMPRODUCT(--(K2:K13="WMT"),(M2:M13))/COUNTIF(K2:K13,"WMT")

which obviously works but it would seem to me there is a more direct
way to do this using the AVERAGE function.

(I'm using SUMPRODUCT here instead of SUMIF because I may need to add
conditions in the future.)

Thoughts?