Excel - VAR Function



VAR Function

The Excel VAR function determines the extent of data dispersion presented in a dataset. This function returns the variances depending on the sample. It is used by business analysts, stock market brokers, to analyze the variation in large sales data. The other term Standard Deviation is calculated by the variations square root. If the resulting value is zero that means, there is no variability among data points.

The VAR function replaces the VAR.S 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
  • Excel 2013

Syntax

The syntax of VAR function is as follows −

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

Arguments

You can use the following arguments with the VAR function −

Argument Description Required / Optional
Number1 The first argument specifies a range of a dataset. Required
Number2, ... It represents the other range of datasets. Optional

Points to Remember

  • Var function works only with numeric value which produces the result representing variance.
  • You can also specify cell references and arrays in the defined arguments.
  • Logical and null values are not countable while computing the VAR function.
  • If data points comprise error values, the Var function will generate #DIV/0! Error.
  • Other variants of the Var function are VAR.P and VAR.S function. You may get the benefits of the VAR.P function if the entire population range is specified in the Var functions argument
  • You can utilize the VARA function to consider the string and logical values.

Examples of VAR Function

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

Example 1

Execute the Var function where data points contain only a numeric value

Solution

The shooting games score of the multiple players is specified in the range B3:E5. Level 1, level 2, level 3, and level 4 of this game are denoted by B, C, D, and E columns.

Step 1 − You may enter the formula "=VAR(B3:E3)" in the F4 cell and press the Enter tab to obtain the result.

Excel VAR Function 1

Excel VAR Function 2

Step 2 − Similarly, enter the formula, =VAR(C5:E5) in the F5 cell and press Enter.

Excel VAR Function 3

Excel VAR Function 4

Step 3 − You may type the following formula in the F6 and F7 cells.

  • F6=VAR(C6:E6)
  • F7=VAR(C7:E7)
Excel VAR Function 5

Excel VAR Function 6

Excel VAR Function 7

As you may observe in the screenshot, we have successfully implemented the VAR function for the three different ranges of data points.

Example 2

If data points comprise error values, the Var function will generate #DIV/0! Error

Solution

Consider the sample dataset comprises mixed values like numbers, logical values, and error. The task is to implement the Var function column-wise.

Excel VAR Function 8

Step 1 − Now, you may enter the formula "=VAR(B3:B6)" in the B7 cell and press Enter to get the output.

Excel VAR Function 9

As you can see in the screenshot, the output is #DIV/0!. The argument B6 contains the error value.

Step 2 − Similarly, you may enter the formula "=VAR(C3:C6)" in the C7 and press "Enter".

Excel VAR Function 10

Excel VAR Function 11

Therefore, the resulting values in the C7 and D7 are #DIV/0!. You could replace the error value in the C6 and D3 cells with integer numbers to obtain the correct output.

Example 3

Logical and null values are not countable while computing the VAR function.

Solution

Consider the sample dataset, write the formula =VAR(B3:B6), and press the Enter tab.

Excel VAR Function 12

Excel VAR Function 13

Here, the "True" value is not countable while evaluating the var function.

Moreover, type the formula "=VAR(C3:C6)" in the C7 cell and press the Enter.

Excel VAR Function 14

Excel VAR Function 15

As you can notice in the screenshot, C3(False), and C5 cell values are ignored during the computation of the Var function.

Example 4

You can also specify cell references and arrays in the defined arguments.

Solution

Enter the formula "=VAR({12,34,54,67},)" in the F7 cell. Here, the first argument contains the four array elements, and the second array is empty.

Excel VAR Function 16

Excel VAR Function 17
Advertisements