The Excel VARPA Function

Related Function:
VAR.P Function
Variance

The Variance is a statistical measure, that is commonly used across a set of values, to identify the amount that the values vary from the average value.

For any set of values, the equation for calculating the Variance is:

Population Variance Equation

where,

  • x takes on each value in the set;
  • x is the average of the set of values;
  • n is the number of values.
For further details, see the Wikipedia Variance page

Function Description

The Excel VARPA function returns the Variance of a given set of values.

The syntax of the function is:

VARPA( number1, [number2], ... )

Where the number arguments are values or arrays of values that provide a minimum of 2 numeric values to the function.

Note that:


VARPA & VARP Functions

The Excel Varpa function is very similar to the Excel Varp function, in that both functions calculate the variance of a supplied set of values.

The difference between these two functions applies when an array of values, containing text or logical values is supplied to the function. In this case, the Varp function ignores the text and logical values, whereas the Varpa function assigns the value 0 to text and the values 1 or 0 to logical values.

The rules for this are shown in the table below, compared to the rules for the Varp function.

VARP Function VARPA Function
Logical values or text (including text representations of numbers), typed directly into the list of arguments ARE counted
(TRUE=1, FALSE=0)
ARE counted
(TRUE=1, FALSE=0)
Text that cannot be interpreted as a number, typed directly into the list of arguments #VALUE! error #VALUE! error
Logical values, within arrays or reference arguments Ignored ARE counted
(TRUE=1, FALSE=0)
Text (including empty text "", text representations of numbers, or other text), within arrays or reference arguments Ignored Counted as zero
Empty cells Ignored Ignored

See the page on Variance in Excel for a comparison of the different Excel variance functions.

Varpa Function Example

The following spreadsheet shows the Excel Varpa function used to calculate the variance of the set of values in cells A1-A4 and in cells A1-A6.

 Formulas:
  A B
1 1 =VARPA( A1:A4 )
2 3 =VARPA( A1:A6 )
3 5 =VARPA( A1:A4, 1, 0 )
4 2  
5 TRUE  
6 text  
 Results:
  A B
1 1 2.1875
2 3 2.666666667
3 5 2.666666667
4 2  
5 TRUE  
6 text  

Note that, in the spreadsheet above, the function in cell B2 includes the values in cells A5 and A6. In this case, the logical value TRUE in cell A5 is treated as the value 1 and the text in cell A6 is treated as the value 0. This is shown by the example in cell B3, in which cells A1-A4 and the values 1 and 0 give the same result as the variance calculation for cells A1-A6.


For further details and examples of the Excel Varpa function, see the Microsoft Office website.


Varpa Function Errors

If you get an error from the Excel Varpa Function, this is likely to be one of the following:

Common Errors
#DIV/0! - Occurs if none of the values that have been supplied to the function are numeric.
#VALUE! - Occurs if any values that are supplied directly to the Varpa function are text values that cannot be interpreted as numbers.