The AVERAGEA function in Google Sheets provides users with a powerful tool to compute mean values across a diverse range of data types. Unlike the traditional AVERAGE function, which only considers numerical values, AVERAGEA effectively handles text representations of numbers and boolean values. This makes it particularly useful in datasets where categorical data might impact overall averages.
Syntax
AVERAGEA(value1, [value2, ...])
- value1: The first value or range of values to include in the average calculation.
- value2: (Optional) Additional values or ranges to consider; up to 30 additional values can be included.
Example #1
AVERAGEA(A1:A5)
This function calculates the average of the data in cells A1 to A5, including numeric, text, and boolean values. For instance, if A1=5, A2=’10’, A3=TRUE (1), A4=FALSE (0), and A5=’hello’, the result would be 3.75.
Example #2
AVERAGEA(1, 2, 3, "4", TRUE)
In this case, the function computes the average of four numbers and a text representation of a number alongside a boolean value. With these inputs, the result would be 2.6, as it considers 1, 2, 3, 4 (from “4”), and 1 (from TRUE) in the calculation.
Example #3
AVERAGEA(D1:D10)
Here, the function averages the values in the range D1 to D10. If the range contains mixed values like D1=8, D2=’12’, D3=TRUE (1), D4=FALSE (0), and the rest are empty or text, the average will be computed only considering numerical equivalents, resulting in a balanced average reflecting true data diversity.
Error handling
- DIV/0!: Occurs when no numerical values are available to calculate an average. Ensure at least one numeric entry is present.
- VALUE!: This error indicates that non-numeric text is present in the data range that can’t be interpreted. Verify the data type of your inputs.
- N/A: It signifies that a value is missing for calculation. Provide valid data points to resolve this error.