View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default Average function

On Fri, 10 Jul 2009 12:28:24 -0700, Shannakinz
wrote:

I have columns set up for each month where we enter the total number of
hours. After these columns, i have a column for "total for the year (hours)"
and for "average of the year (hours)". Right now, i've just put in a basic
average function to calculate using the columns for the months. Example:
=AVERAGE(AP13:BA13).

My problem is that some months do not have values, and i would like to
exclude them from the average calculations. Is there a way to tell excel that
it should only calculate the average of the months that have a value 0 ?

Thanks.


If the cells for the months that "do not have values" are blank, you
don't have to do anythink. AVERAGE does not include blank cells in the
calculation.
But if the cells for the months that "do not have value " have 0 or
some negative number, you may try the following formula:

=AVERAGE(IF(AP13:BA130,AP13:BA13))

Note: This is an array formula that has to be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

Hope this helps / Lars-Åke