logo
search
Formula Errors

How to Fix the DAVERAGE #DIV/0! Error in Excel

Tauseeq MagsiTauseeq Magsi Oct 15, 2026 868 views

Question details

The user is encountering a #DIV/0! error when using the DAVERAGE function and wants to know how to remove or handle it.

How to Fix the DAVERAGE #DIV/0! Error in Excel
Product
Excel
Device & OS
not provided
Scenario
Calculating an average from a database using the DAVERAGE function based on specific criteria.
Observed behavior
The formula returns a #DIV/0! error because no records in the dataset match the criteria, causing Excel to attempt a division by zero.
Before you start

Double-check your criteria range and database dataset to ensure there are no hidden spaces, typos, or spelling mistakes causing a criteria mismatch.

Solution 1Recommended

Wrap the Formula with the IFERROR Function

The most reliable way to handle this error is to use the IFERROR function, which replaces the #DIV/0! error with a cleaner custom value, such as 0 or a blank cell.

When the DAVERAGE function finds no matching records, it tries to divide the total sum by zero. The IFERROR function catches this mathematical error and allows you to specify exactly what should be displayed instead.

1
Select the error cell

Click on the cell currently displaying the #DIV/0! error generated by your DAVERAGE formula.

2
Edit the formula

Click inside the Formula Bar at the top of the Excel worksheet to modify the existing text.

3
Add the IFERROR function

Wrap your existing formula inside the IFERROR function. For example, change it to: =IFERROR(DAVERAGE(A8:I22,"Supervisor Review",O12:O13), 0).

4
Apply the update

Press Enter on your keyboard to calculate the new formula. The cell will now display 0 instead of the error.

Wrap the Formula with the IFERROR Function
Display Blank Cells: If you prefer the cell to look completely empty when no data matches, replace the 0 at the end of the formula with empty quotes, like this: "".
Powerful Spreadsheet Capabilities

Easily Manage Database Functions in WPS Spreadsheet

WPS Spreadsheet provides robust support for all standard database and error-handling functions, including DAVERAGE and IFERROR. You can quickly troubleshoot formula errors using its intuitive interface.

  1. 1. Open your file in WPS: Launch WPS Office and open your workbook using WPS Spreadsheet.
  2. 2. Locate the error cell: Find the cell displaying the #DIV/0! error and click on it.
  3. 3. Apply IFERROR: Use the formula bar to wrap your DAVERAGE function with =IFERROR(..., 0) and press Enter.
Fully compatible with Microsoft Excel formulas and functionsBuilt-in error checking and formula evaluation toolsLightweight application with high performance on large datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why does the DAVERAGE function specifically return #DIV/0!?

The DAVERAGE function calculates the average of values in a database that meet specific criteria. If no records match your criteria, the count of matching items is zero. Excel attempts to divide the total sum by zero to find the average, which triggers the #DIV/0! mathematical error.

Can I show a blank cell instead of the #DIV/0! error?

Yes. By wrapping your DAVERAGE formula in the IFERROR function, you can tell Excel to output a blank cell when an error occurs. Use the syntax =IFERROR(DAVERAGE(...), "").

Does the IFERROR function hide other legitimate formula errors?

Yes, the IFERROR function will catch and replace all standard Excel errors, including #N/A, #VALUE!, #REF!, and #NAME?. It is highly recommended to ensure your DAVERAGE formula is structurally correct before wrapping it in IFERROR.