Function Description
| Category | Description |
|---|---|
| Syntax | AVERAGE(number1,number2,...,countstring) |
| Function | Returns the average of the specified values. |
| Parameters | number1, number2, ...: the arguments used to calculate the average countstring: determines whether text and logical values are included in the count - false: text and logical values are not included in the count.- true: text and logical values are included in the count. |
| Number of Parameters | 1 or more countstring is optional. |
| Parameter Type | Number |
| Return Value Type | Number |
| Notes | 1. Arguments must be numbers or names that contain numbers, arrays, or references. 2. If an array or reference argument contains text or logical values, those values are included in the count by default. If the countstring value is false, they are not included in the count.3. Empty cells are not included in the count. 4. Zero values and empty strings in cells are included in the count. |
Examples
Assume A1:A6 contains 10, 23, text, 29, 33, and 25.
| Formula | Result | Notes |
|---|---|---|
AVERAGE(A1:A6) | 20 | Text and logical values are included in the count by default:(10+23+0+29+33+25)/6=20 |
AVERAGE(ages) | 20 | Text and logical values are included in the count by default:(10+23+0+29+33+25)/6=20 |
AVERAGE(A1:A6,false) | 24 | Since the countstring value is false, text and logical values are not included in the count:(10+23+29+33+25)/5=24 |
AVERAGE(A1:A6,27) | 21 | [(10+23+0+29+33+25)+27]/7=21 |