Thread: Averages
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Averages

On Jul 30, 9:19*am, Paige06 wrote:
I need to average a row *some cells have 0's but I need to include them in
the function so it averages correctly. The formula I currently have is this
=AVERAGE(IF(B38:M38<0,B38:M38,"")). It is working with the cells with
numbers, but not the cells that do not. Example : jan - 5, feb - 7, mar. 0,
april - 18 = 30 divided by 4 = 7.50. My sheet will only calulate 3. Any
suggestions?????


You intentions are unclear to me.

First, your formula says that you want to exclude zero-valued cells
from the average. But your first statement says "I need to include
them", and your example ("divided by 4") and your intended result
(7.5) suggests that you do indeed want to include zero-valued cells.

Second, from the presentation of the example, it is unclear to me
whether the range B38:M38 includes just cells with numeric values
(e.g. 5, 7, 0 and 18 in the example) or also cells with text (e.g.
literally "jan", 5, "feb", 7, "mar", 0, "april", 18). That may or may
not have anything to do with your problem.

Finally, you provide nothing in your example that would explain how
your formula returns 3. I suspect the value of 3 is coming from
different example, not the example supplied in your posting.

Having said that, looking only at the syntax of the example formula
above, did you remember to enter it as an array formula (commit with
ctrl-shift-Enter, not just Enter)?

If you do not, then the formula above is logically equivalent to:

=if(B38<0, average(B38:M38), 0)

That may or not may not be the root cause of your problem, given that
I do not understand your intentions.