View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Averageif function with range that includes non-consecutive cells

Alternative

=SUM(SUMIF(INDIRECT({"P6","R6:V6","X6:Z6"}),"<=5") )/
SUM(COUNTIF(INDIRECT({"P6","R6:V6","X6:Z6"}),"<=5" ))

If this post helps click Yes
---------------
Jacob Skaria


"Daniel Collison" wrote:

I am trying to average a range of numbers if the values are less than or
equal to 5. The range includes non-consecutive cells. I have attempted two
different versions of the averageif formula (see below). Both versions
return a #VALUE error.

=AVERAGEIF((P6,R6,S6,T6,U6,V6,X6,Y6,Z6),"<=5")
=AVERAGEIF((P6,R6:V6,X6:Z6),"<=5")

Thanks,