The DVARP function returns the variance for an entire population retrieved from a field (column) that matches the conditions you specify.
Syntax
DVARP(database, field, criteria)
Arguments
Database (Required): The range of cells that makes up the database. The first row of the database should be the column headers;
Field (Required): The column you will retrieve the variance from. It can be entered as a column label, index number or a cell reference:
-- Column label: The column label (column header) needs to be entered between double quotation marks, such as “Weight”.
-- Index number (left to right): The number (without quotation marks) that represents the position of the column in the database, from which you will return the sample variance. For example, 1 represents the first column in the database, 2 represents the second column, and so on.
-- Cell reference: A cell references to the field.
Criteria (Required): The range of cells that contains the criteria. The first row of the criteria range should be the column headers.
-- The criteria range must include at least one column header and at least one cell value below the column header for specifying the condition.
-- You can use any range for the criteria argument, but it is not recommended to place the criteria range below the database list, in case you need to add more data to the database in the future.
Remarks
1. The "field" label is not case sensitive.
2. If the "field" or "criteria" is left blank, then #VALUE! is returned.
3. If any column label in the criteria range does not match the column label in the database, a #DIV/0! error value returned.
4. To calculate an entire column in a database, just insert a blank row below the column labels in the criteria range.
Return Value
It returns a numeric value representing the variance.
Example
As shown in the screenshot below, to get the variance in the Weight column based on the criteria mentioned in the Criteria table (G5:H6) if the database is the entire population, you can try the DVAR function to get it done.
Select a blank cell to output the result, copy or enter the formula below and press the Enter key.
=DVARP(B4:E9,4,G5:H6)
Notes:
1. In the formula, the number 4 indicates the fourth column in the database.
2. You can directly type in the column header and enclose it in double-quotes.
=DVAR(B4:E9,"Weight",G5:H6)
3. Or use a cell reference as this (E4 is the cell references to the field):
=DVARP(B4:E9,E4,G5:H6)
4. The field label is not case sensitive.
Related Functions
Excel DVAR function The DVAR function estimates the variance of a sample retrieved from a field (column) that matches the conditions you specify.