DAVERAGE

Database Functions
(4.7/5)

Returns the average of numeric values in a field of records in a list or database that match conditions you specify.

Interactive Formula Tester

=DAVERAGE("10,20,30,40,50")

Complete Theory & Understanding

Master the fundamentals of Excel DAVERAGE function

Core Concept

DAVERAGE calculates the average of numeric values in a specified field for database records that meet given conditions. It uses a criteria range to filter records before averaging, making it powerful for analyzing structured data with multiple conditions.

Why Use DAVERAGE?

  • Average by region/product
  • Average by account/period
  • Average scores by criteria

Key Characteristics

Database Structure

Requires proper database layout with headers

First row = field names

Field Specification

Field name or 1-based index

DAVERAGE(..., "Sales", ...)

Criteria Range

Separate criteria range with field names

Criteria in separate range

Function Anatomy

=DAVERAGE(parameters...)
Required
Parameters:

Function-specific parameters

Returns
Return Value:

Function-specific return type

Primary Use Cases

Sales Analysis

Average by region/product

Financial Reports

Average by account/period

Performance Metrics

Average scores by criteria

Theory Summary

Precise

Exact matching required

Position-Based

Returns numeric position

Error-Safe

Handles missing text gracefully

Syntax & Parameters

=DAVERAGE(database, field, criteria)
Required
database:

Range of cells that makes up the database. First row must contain field names.

Required
field:

Field name or index (1 for first field) indicating which column to average

Required
criteria:

Range containing conditions. First row must contain field names.

Returns
Return Value:

Average of matching numeric values

Description: Averages database records meeting criteria

Interactive Examples

Average Sales by Region

Average sales for North region

"Database with Region and Sales columns"
=DAVERAGE(A1:C100, "Sales", E1:F2)
Average of matching sales

Averages Sales where Region matches criteria

VBA Implementation & Automation

Basic VBA

Simple VBA usage

Sub UseDAverage()
    Dim ws As Worksheet
    Set ws = ThisWorkbook.Sheets("Sheet1")
    
    ' Average sales for matching records
    ws.Range("G1").Value = Application.WorksheetFunction.DAverage(ws.Range("A1:D100"), _
        "Sales", ws.Range("E1:F2"))
End Sub

Business Applications

Sales Analysis

Average by region

=DAVERAGE(Data, "Sales", Criteria)

Financial Reports

Average by period

=DAVERAGE(Data, "Amount", Criteria)

Common Issues & Solutions

Wrong Results

Criteria not matching

Check field names match

Solution: Verify criteria range format matches database headers

Performance Tips & Best Practices

⚡ Performance Optimization

  • Use specific ranges
  • Keep criteria range compact
  • Consider AVERAGEIFS for newer Excel