Average a
AVERAGEA Function¶
The AVERAGEA function in Excel calculates the average (arithmetic mean) of the values in its arguments, treating
logical values and text differently compared to the AVERAGE function.
Key Features of AVERAGEA:¶
- It includes text and logical values in its calculation:
TRUEis treated as1.FALSEand text (non-numeric) values are treated as0.
- Numeric values are calculated as they are.
This function is particularly useful when you want to incorporate logical values or non-numeric data in your calculations.
Syntax:¶
- value1, [value2], ...: These are the values or references you want to calculate the average for. The
value1argument is required, while subsequent arguments are optional.
Examples:¶
-
=AVERAGEA(10, 20, 30, TRUE)
Calculates the average of the numbers10, 20, 30and includesTRUEas1in the calculation.
Result:15.25 -
=AVERAGEA(5, 10, "Hello", FALSE, 15)
Considers"Hello"as0,FALSEas0, and calculates the average of the values.
Result:6 -
=AVERAGEA(A1:A5)
Computes the average for the rangeA1:A5, including logical values or texts if present.
Notes:¶
- The
AVERAGEAfunction extends the traditionalAVERAGEby providing support for logical and text values during calculations, making it versatile for mixed data types. - Error values or text that cannot be converted to numbers will result in an error.
- When only logical or text values are provided, the function will still return an average based on their
representation (
TRUEas1,FALSEas0, and text as0).
Tip: Use
AVERAGEAinstead ofAVERAGEwhen your data contains logical values or text that you want to factor into the average calculation.