DAVERAGE function

Calculates the average of values in a database field that meet specified criteria, useful for finding filtered averages without creating separate tables.

=DAVERAGE(database, field, criteria)

Generate a DAVERAGE formula

Describe what you need. The generator will reach for DAVERAGE where DAVERAGE is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How DAVERAGE reads its arguments
databaserequiredfieldrequiredcriteriarequiredDAVERAGE
ArgumentRequiredDescription
databaseRequiredThe range containing the table, including headers in the first row. All data rows below the header row are included; must be a rectangular range.
fieldRequiredThe column to average, specified as either a text column name (e.g., "List Price") or a column number (1 for the first column). Returns #VALUE! if the field doesn't exist.
criteriaRequiredA range with a header row matching a database column name, followed by one or more rows containing filter values. Uses AND logic for multiple columns; #N/A if malformed or no matches found.

Returns

A numeric value representing the average of the field column for all rows matching the criteria.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Find average list price of 3-bedroom homes

AddressBedsBathsList PriceDays on Market
123 Oak St3245000015
456 Elm Ave436250008
789 Pine Dr2127500045
321 Maple Ln3249500022
654 Birch Way42.558000012
Beds
3
=DAVERAGE($A$1:$E$6,"List Price",$A$8:$A$9)

Result: 472500

The criteria range (rows 8–9) filters for homes with exactly 3 bedrooms. Two homes match: 123 Oak St at $450,000 and 321 Maple Ln at $495,000. DAVERAGE returns their average: (450,000 + 495,000) / 2 = 472,500.

2. Find average days on market for homes under $500,000

AddressBedsBathsList PriceDays on Market
123 Oak St3245000015
456 Elm Ave436250008
789 Pine Dr2127500045
321 Maple Ln3249500022
654 Birch Way42.558000012
List Price
<500000
=DAVERAGE($A$1:$E$6,"Days on Market",$D$8:$D$9)

Result: 27.33

The criteria range (rows 8–9) filters for homes listed below $500,000. Three homes match: 123 Oak St (15 days), 789 Pine Dr (45 days), and 321 Maple Ln (22 days). DAVERAGE returns their average: (15 + 45 + 22) / 3 ≈ 27.33 days.

3. Find average bathrooms for 4-bedroom homes

AddressBedsBathsList PriceDays on Market
123 Oak St3245000015
456 Elm Ave436250008
789 Pine Dr2127500045
321 Maple Ln3249500022
654 Birch Way42.558000012
Beds
4
=DAVERAGE($A$1:$E$6,"Baths",$B$8:$B$9)

Result: 2.75

The criteria range (rows 8–9) filters for 4-bedroom homes. Two homes match: 456 Elm Ave with 3 bathrooms and 654 Birch Way with 2.5 bathrooms. DAVERAGE returns their average: (3 + 2.5) / 2 = 2.75.

Common errors

Which DAVERAGE error are you seeing?
DAVERAGE returned an error#VALUE!
Verify the field name matches exactly a column header (check spelling and spacing), or use a valid column number where A = 1, B = 2, etc.
#N/A
Ensure the criteria range header row exactly matches a database column name, and verify at least one data row meets the criteria values you specified.
#REF!
Verify all range references ($A$1:$E$6 and $A$8:$A$9) exist and are valid; use absolute references consistently to avoid accidental shifts.
ErrorWhy it happensHow to fix it
#VALUE!The field argument is invalid—either the column name doesn't match any header in the database, or the column number is outside the database range.Verify the field name matches exactly a column header (check spelling and spacing), or use a valid column number where A = 1, B = 2, etc.
#N/AThe criteria range is malformed (header doesn't match a database column name) or no records in the database satisfy the criteria conditions.Ensure the criteria range header row exactly matches a database column name, and verify at least one data row meets the criteria values you specified.
#REF!The database or criteria range references are broken—pointing to deleted rows, invalid range syntax, or cells outside the sheet.Verify all range references ($A$1:$E$6 and $A$8:$A$9) exist and are valid; use absolute references consistently to avoid accidental shifts.

Tips and when to use something else

  • Always wrap column names in quotes: DAVERAGE($A$1:$E$6, "List Price", ...) not DAVERAGE($A$1:$E$6, List Price, ...).
  • For multiple criteria on the same field (e.g., Beds = 3 OR Beds = 4), DAVERAGE only supports AND logic; use SUMPRODUCT for OR conditions instead.
  • When combining multiple criteria (Beds = 3 AND Price > 400000), include both column headers and their values in the criteria range.
  • Blank cells and text in the field column are ignored during averaging; to exclude rows with zero prices or other unwanted values, add a criteria condition like ">0" to the criteria range.

Frequently asked questions

Can DAVERAGE handle multiple criteria at the same time?
Yes, but all criteria must use AND logic. List each column header in the criteria range with its corresponding criteria value below it. If you need OR logic (Beds = 3 OR Beds = 4), use SUMPRODUCT instead.
What's the difference between DAVERAGE and AVERAGEIFS?
Both calculate averages with criteria, but AVERAGEIFS uses cleaner syntax with separate range/criterion arguments for each condition. DAVERAGE requires a separate criteria range matching database headers. For new sheets, AVERAGEIFS is generally preferred unless you prefer the database function family.
Why does my DAVERAGE formula return #N/A even though matching records exist?
Check that your criteria range has the correct column name in the first row (matching exactly a database header) and that criteria values are in rows below the header. Verify capitalization and spacing match the database headers exactly.
Can DAVERAGE average text values or does it only work with numbers?
DAVERAGE only averages numeric values. If the field contains text, it returns #VALUE!. Use DCOUNT or COUNTA to count matching records instead, or DSUM if summing numeric fields.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17