View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic Domenic is offline
external usenet poster
 
Posts: 256
Default SUBTOTAL function to average column without blanks

I take it you mean a list where rows have been manually hidden, instead
of filtered. In any case, the SUBTOTAL function ignores empty cells.
Or do you want an average that excludes zeros. If so, try the following
formula, which needs to be confirmed with CONTROL+SHIFT+ENTER...

=AVERAGE(IF(SUBTOTAL(102,OFFSET(P3:P60,ROW(P3:P60)-ROW(P3),0,1)),IF(P3:P6
0 0,P3:P60)))

Hope this helps!

In article ,
Campbell wrote:

I can use the SUBTOTAL command with the 101 function to average only visable
cells in a filtered list.
However how can I exclude empty cells from being included in the average?
I can do this with an "array formula", e.g.
{=AVERAGE(IF(P3:P60<0, P3:P60,""))}
but not with a filtered list using visable cells only.
Any help appreciated.