What is the DVAR function?
=DVAR(database, field, criteria)DVAR treats the field values of the matching records as a sample and returns their variance. Its conditions are written as a separate table on the sheet.
The sample variance divides the sum of squared deviations by (count-1), so at least 2 numbers must match.
Arguments
- database
- The whole list. The first row must hold the headers.
- field
- The column to calculate: a column number (the first column is 1), a header name such as "Sales", or a cell holding the header (D1).
- criteria
- The criteria table. Its first row uses the same headers as the database, with the conditions below.
DVAR examples
Example 1. Basic use
=DVAR(A1:D9, 4, F1:F2)The sample variance of the Seoul sales 45000, 25600 and 96000: about 1322253333.33.
Example 2. OR condition
=DVAR(A1:D9, 4, F1:F3)The variance of the 6 sales for Seoul or Busan.
Common mistakes
Mixing it up with the population version
If the matching values are the whole population, use DVARP.
Leaving the header out of the criteria range
The first row of the criteria range must be a header. Without it, the first condition is read as the header.
FAQ
- How does it relate to VAR.S?
- It is the same as VAR.S on only the matching values.
- And the standard deviation?
- The square root of DVAR is DSTDEV.