DVAR Function in Excel

DVAR Function in Microsoft Excel

Introduction

The DVAR function in Microsoft Excel is a database function that estimates the variance of a population based on a sample. It uses the numbers in a field (column) of records in a list or database that match the conditions that you specify.

Syntax & Arguments

The syntax for the DVAR function is as follows:

syntax
DVAR(database, field, criteria)

Arguments:

  • Database: This is the range of cells that comprise the list or database. A database is a list of related data in which rows of related information are records and columns of data are fields. The first row of the list contains labels for each column.
  • Field: This indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as “Age” or “Yield,” or a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.
  • Criteria: This is the range of cells containing the conditions you specify. You can use any content for the criteria argument as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.

The function returns the variance of a population based on a sample by using the numbers in a field (column) of records in a list or database that match the conditions you specify.

Examples

Example 1

Purpose: To calculate the variance of sales volumes for a specific product category.

Data tables and formulas:

ABCD
1ProductCategorySales
2Product ACategory 11200
3Product BCategory 21500
4Product CCategory 11300
5Product DCategory 31100
6Product ECategory 11400
7Criteria
8Category
9Category 1
10Formula
11=DVAR(A2:C6, "Sales", A8:A9)

Explanation: This formula calculates the variance of sales volumes for products in “Category 1”. The database range is A2:C6, the field is “Sales”, and the criteria are specified in A8:A9. The result is the variance in the sales volumes of the products that meet the requirements.

Example 2

Purpose: To calculate the variance of the ages of employees in a specific department.

Data tables and formulas:

ABCD
1EmployeeDepartmentAge
2Employee AHR35
3Employee BSales42
4Employee CHR39
5Employee DIT33
6Employee EHR37
7Criteria
8Department
9HR
10Formula
11=DVAR(A2:C6, "Age", A8:A9)

Explanation: This formula calculates the variance of the ages of employees in the HR department. The database range is A2:C6, the field is “Age”, and the criteria are specified in A8:A9. The result is the variance of the ages of the employees that meet the requirements.

Example 3

Purpose: To calculate the variance of the scores of students in a specific class.

Data tables and formulas:

ABCD
1StudentClassScore
2Student AClass 185
3Student BClass 290
4Student CClass 188
5Student DClass 392
6Student EClass 187
7Criteria
8Class
9Class 1
10Formula
11=DVAR(A2:C6, "Score", A8:A9)

Explanation: This formula calculates the variance of the scores of students in “Class 1”. The database range is A2:C6, the field is “Score”, and the criteria are specified in A8:A9. The result is the variance of the scores of the students that meet the requirements.

Tips and Tricks

  • Make sure that the criteria range does not overlap the list.
  • Do not place the criteria range below the list. If you add more information to the list, the new information is added to the first row below the list. If the row below the list is not blank, Microsoft Excel cannot count the further information.
  • To operate on an entire column in a database, enter a blank line below the column labels in the criteria range.

Leave a Comment