« Freezing row & column headers | Main | Printing only non-zero values »
September 24, 2004
Averaging non-zero values
Here is a simple trick to exclude zero-valued cells from functions where it might be desired - for example the AVERAGE function.
In the example below, we average the sales figures over a number of counties. That is straightforward =AVERAGE(Range)
However, by using the ever-so-useful COUNTIF together with the SUM function, we can instead just average the non-zero values.
However, by using the ever-so-useful COUNTIF together with the SUM function, we can instead just average the non-zero values.
Posted by Dave at September 24, 2004 02:34 AM
Comments
That's awesome!
Posted by: Dan at April 1, 2006 08:05 PM