The information in this article applies to:
SUMMARYIn Microsoft Excel, when you use the AVERAGE function with a range of values that includes zero values, the zero values are calculated in the result. However, empty (blank) cells are ignored. You can modify either of these behaviors by using the methods shown below. MORE INFORMATIONExample 1On your worksheet, enter the following data:
The number 2 is returned in cell A6. To use the AVERAGE function on the range and ignore the zero value, enter the following formula in cell A6:
Do not enter the curly brackets manually. To enter the formula as an array formula, press CTRL+SHIFT+ENTER simultaneously and the brackets are automatically entered. The value 2.5 is returned. Example 2There may be times when you would like to have the AVERAGE function treat blank cells as zeros.On your worksheet, enter the following data:
To have the blank cell treated as a zero, change the formula in cell A6 to the following:
Again, enter the curly brackets by pressing CTRL+SHIFT+ENTER simultaneously. Do not attempt to type them in. This formula now returns the value 2. The techniques described above may be used with any Microsoft Excel function that treats blanks in a range of cells differently from zeros. REFERENCES
"Function Reference," version 4.0, page 31 Additional query words: 2.00 2.01 2.10 2.20 2.21 4.00 IRR NPV MEDIAN COUNT COUNTA MAX MIN STDEV STDEVP VAR VARP
Keywords : |
Last Reviewed: March 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |