=AVERAGE(b7:b20) is counting fiels that are zero

O

outrigger

I brought cell information from worksheet B into worksheet A, by typing = in
a cell and then clicking on cell in worksheet B and hitting enter. Data in
that cell is empty. So excell placed a "0" in the final cell. When I average
the column it of course adds the zero's. I don't want it to do that, only
the numbers gtreater that '0". How do I get this accomplished?
 
J

Jacob Skaria

either modify the orginal formulas to
=IF(Sheet1!A1="","",Sheet1!A1)

OR average to be modified to as below
=SUMIF(b7:b20,">0")/COUNTIF(b7:b20,">0")

or
'array entered (ctrl+Shift+Enter)
=AVERAGE(IF(b7:B20>0,B7:B20))


If this post helps click Yes
 

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