AVERAGE function

F

FMMM

I"m trying to usage the average function to average all numbers excluding 0.

Here's how i set up the function:
A B C D
7
8 JAN FEB MAR
9 Apples Bought 0 839 9,206

using this formula AVERAGE(IF(B9:D9<>0,B9:D9,"")) the result should be
5022.5. This is what is shown when i click on the function bar to look at the
formula but on my spreadsheet it gives me and error #VALUE. Do you know why
this is?

FMMM
 
F

FSt1

hi
the average function automaticly sums AND counts all value in a range
including zeros so you can't exclude zeros with the average function.
so.....create your own......

=IF(SUM(B9:D9)<>0,SUM(B9:D9)/COUNTIF(B9:D9,">0"),"")

this would exclude zeros.

Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top