Thread: Averages
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Paige06 Paige06 is offline
external usenet poster
 
Posts: 9
Default Averages

Thanks Joe,

I will try to explain again more clearly. I was a little frazzeled when I
wrote that.
I have 1 main sheet that I enter number into each month. From that sheet I
have each cell for each sales guy linked into the 2nd sheet. On the second
sheet for each month I want an average of sales numbers calculating as I
enter numbers each month. I wasn't aware that the orginal formula I had
excluded 0. I have tried to change the formula and it still will not
calculate each month even with the 0's, only the month with the number
amount. And if I try to use =average A1:A15 it gives a wrong number. But if I
open a new sheet it works the way I want it to. ???????? I'm not by any means
an excel expert, but I do know a little. And yes, my formula was an array.

"joeu2004" wrote:

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.