removing zero values when averaging

T

Tim

Is there any way to remove zero values (ie, make them a
null value) from an average in either Excel 97 or XP?

I have a large spreadsheet with many zero values, but want
to disregard these as entries, without going through the
entire spreadsheet and deleting them.

Tim.
 
F

Fenco

To embed your formula in function IF: For example your orignal figures is cell A1= 45, cell B1 = 0, then using functiion IF like that:-
=IF(B1=0,"", A1/B1)

Hope can help you!
 
B

beeawwb

I don't know that much about advanced Excel functions, but could you d
something like...

=(SUMIF(Range:Range,"<>0"))/(COUNTIF(Range:Range,">0"))

That works. Just tried it.

Example.

A1 = formula, B1:D10= where entering cells.

=(SUMIF(B1:D10,"<>0"))/(COUNTIF(B1:D10,">0"))

Hope it helps.

-Bo
 
B

Bif

Hi Tim,

Here's one way:

Say you want to average the values in the range A1:A8 but
exclude zero values.

=AVERAGE(IF(A1:A8,A1:A8))

Entered as an array - CTRL+SHIFT+ENTER

Biff
 

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