Excel - VARP Function



VARP Function

The Excel VARP function calculates the variance depending on the entire population. The VARP function and VAR function come under the category of Statistical functions in Excel. Manually, calculating the VARP function through the mathematical formula for a large population may be prone to error and may provide incorrect results.

The VARP function replaces the VAR.P function in Excel 2010.

Compatibility

This advanced Excel function is compatible with the following versions of MS-Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2019 for Mac
  • Excel 2016

Syntax

The syntax of VARP function is as follows −

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

Arguments

You can use the following arguments with the VARP function −

Argument Description Required / Optional
Argument 1 It represents the numeric range of data from the population. Required
Argument 2... It also indicates another range of data points. You may specify up to 254 arguments Optional

Points to Remember

  • Integers values, cell reference, named range, and arrays are considered in the defined arguments.
  • Logical, empty cells and text values are not countable in this function.
  • The VARP function generates the error triggered by field values that contain erroneous values or strings that cannot be converted to a number.
  • If the array contains the error element, then the resulting value will also generate the same error.
  • If arguments contain only the Boolean values, then the #DIV/0! error will occur.
  • The arguments denote the population not the sample in the VARP function. If your data represents a sample of the population, then compute the variance by using VAR.

Examples of VARP Function

Practice the following examples to learn the use of the VARP function in Excel.

Example 1

Integers values, cell references, named range, and arrays are considered in the defined arguments.

Solution

Assume the sample dataset represents the Sales production in the 2020 and 2021 years of the different countries. You may enter the formula =VARP(B2:B10) in the B11 cell and press the Enter tab.

Excel VARP Function 1

Furthermore, you can enter the expression =VARP(C2:C10) in the C11 cell to obtain the resulting value.

Excel VARP Function 2

Excel VARP Function 3

Example 2

Logical, empty cells and text values are not countable in this function.

Solution

Consider the worksheet where the B column consists of mixed values like numeric values, Boolean values, String, and empty cell values. You can enter the formula =VARP(B2:B10) in the B11 cell and press the Enter.

Excel VARP Function 4

Excel VARP Function 5

As you can notice in the screenshot, apart from the numeric values, remaining field values in the B column are ignored.

Example 3

The VARP function generates the error triggered by field values that contain erroneous values or strings that cannot be converted to a number.

Solution

You may enter the formula =VARP(#N/A, 0,34) in the C2 cell. In the given expression, the first argument contains an error so after evaluating this formula, the #N/A is the output.

Excel VARP Function 6

Excel VARP Function 7

You can write the given expression in the C3 cell.

=VARP("Pranjal", 345)

Solution

In this given expression, the first parameter contains text, and the other parameter specifies the integer value. The text value would not be transformed into a number so the error #VALUE! will occur while executing the expression.

Excel VARP Function 8

Example 4

If arguments contain only the Boolean values, then the #DIV/0! error will occur.

Enter the expression =VARP({TRUE, FALSE}) in the C4 cell.

Excel VARP Function 9

Here, the VARP function will generate an error if the array inside the VARP function contains only Boolean values. If an array comprises a mixed combination of numbers and Boolean values, then the Boolean values are not countable.

Excel VARP Function 10

Therefore, the output of the given expression is #DIV/0!.

Advertisements