Quick Navigation
DVAR Function
Summary
The DVAR function estimates the variance for a subset of database records matching specified criteria, treating the matching data as a sample from a larger population. Perfect for analyzing variability in filtered datasets.
Syntax
DVAR(database, field, criteria)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| database | Range |
Yes | Database range including column headers |
| field | String/Number |
Yes | Field identifier - column label or position number |
| criteria | Range |
Yes | Criteria range defining which records to include |
Using the DVAR Function
DVAR enables statistical analysis on filtered portions of your data table. Use it when you need to calculate sample variance for records meeting specific conditions, such as analyzing yield variability for certain tree types or sales performance for specific regions.
Common DVAR Examples
Sample Variance for Apple/Pear Trees
=DVAR(A4:E10, "Yield", A1:A3)
Calculates sample variance of yields for apple and pear trees taller than 10 units. Returns 8.8.
Sales Variance by Region
=DVAR(A1:D20, "Sales", F1:F2)
Sample variance of sales figures for "North" region records.
Employee Age Variance
=DVAR(B1:F25, 3, H1:H3)
Uses column number 3 (Age) for employees with Salary >50000.
Frequently Asked Questions
Common Errors and Solutions
#VALUE! error
Cause: Field name doesn't exist or criteria range invalid
Solution: Verify field name matches header exactly and criteria includes headers
Incorrect variance result
Cause: Using DVARP instead of DVAR for sample data
Solution: Use DVAR for samples, DVARP for complete populations
#NUM! error
Cause: Insufficient matching records for variance calculation
Solution: Ensure criteria returns at least 2 matching records
Notes
- First database row must contain column headers
- Criteria range cannot overlap database
- Use blank row in criteria for entire column operations
- Excel Web Apps don't support named ranges for criteria
- Maximum flexibility with both field names and numbers
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365
Not available in:
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+