Thread: Average IF
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Average IF

You can use SUMPRODUCT if you don't want to use arrays; just have to remember
how an average is actually calculated and break it down.

=SUMPRODUCT(($F$2:$F$2741E2744)*($H$2:$H$27410)* ($L$2:$L$27410)*($H$2:$H$2741))/SUMPRODUCT(($F$2:$F$2741E2744)*($H$2:$H$27410)*( $L$2:$L$27410))

This calculates the sum of everything that meets your crtieria, then divides
by the count.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"PAL" wrote:

I am using MS Excel 2003.

I am trying to get the average of numbers in a column if the fit several
criteria. SUMPRODUCT is not appropriate, right?

I tried this AS AN ARRAY but it doesn't seem to work.

E2744 is a date

=IF(AND($F$2:$F$2741E2744,$H$2:$H$27410,$L$2:$L$ 27410),AVERAGE($H$2:$H$2741),"")

Ideas.