Formula Errors

How to Fix Excel AVERAGE #DIV/0! Error for Blank Ranges

Phi Hung VoPhi Hung Vo Nov 10, 2026 869 views

Question details

The user needs a way to prevent the #DIV/0! error when using the AVERAGE function on a cell range that contains no numeric values.

How to Fix Excel AVERAGE Returning #DIV/0! for Blank Ranges
Product
Excel
Device & OS
not provided
Scenario
Calculating the average of a range of cells that might be completely empty or contain only non-numeric text data.
Observed behavior
The AVERAGE function ignores empty and text cells, meaning an empty range has a numeric count of zero. Dividing the sum by zero causes Excel to return a #DIV/0! error instead of 0.
Before you start

Identify the cell range causing the #DIV/0! error and decide whether you want blank cells to be ignored entirely (returning 0 for the whole empty range) or explicitly treated as individual zero values in your average calculation.

Solution 1Recommended

Use IFERROR to Return Zero for Empty Ranges

This is the most straightforward method to handle the error by substituting the #DIV/0! result with a 0, preventing the error from affecting dependent formulas.

The IFERROR function catches any error produced by the primary formula and replaces it with a specified value. Since calculating the average of zero numeric values mathematically results in a division by zero, wrapping the AVERAGE function in IFERROR is the cleanest solution.

1
Select the target cell

Click on the cell where you want the average result to be displayed.

2
Input the IFERROR formula

Type =IFERROR(AVERAGE(A1:A10), 0) into the formula bar, replacing A1:A10 with your actual cell range.

3
Apply the formula

Press the Enter key. If the range is empty or contains only text, the cell will now display 0 instead of #DIV/0!.

Use IFERROR to Return Zero for Empty Ranges
Tip for displaying blank cells: If you prefer the cell to remain completely blank instead of displaying a 0 when the range is empty, use =IFERROR(AVERAGE(A1:A10), "") instead.
Calculate Averages Seamlessly in WPS Office

Fix Formula Errors Easily with WPS Spreadsheet

WPS Spreadsheet offers full compatibility with Excel functions like AVERAGE, IFERROR, and array formulas. You can use the exact same formulas to manage blank cells and avoid #DIV/0! errors in your financial or data analysis tasks.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your workbook containing the data range.
  2. 2. Select the calculation cell: Click the cell where you need to calculate the average.
  3. 3. Apply the error-handling formula: Type =IFERROR(AVERAGE(Your_Range), 0) and press Enter to instantly fix the #DIV/0! error.
100% compatible with Microsoft Excel formulas, functions, and .xlsx file formats.Built-in error checking helps quickly identify and resolve #DIV/0! or other formula issues.Completely free and lightweight alternative to Microsoft Excel.User-friendly interface requiring zero learning curve for Excel users.
microsoft office alternative - wps office

Frequently Asked Questions

Why does AVERAGE return #DIV/0! instead of 0?

The AVERAGE function calculates the sum of the numbers divided by the count of numeric values. Since blank cells and text strings are ignored, an empty range has a numeric count of zero. Dividing the sum by zero triggers the #DIV/0! error, as division by zero is mathematically undefined.

Does the AVERAGEA function fix the blank cell error?

No, it does not fully fix it. While AVERAGEA evaluates text strings and logical values (like TRUE/FALSE) as numbers, it still ignores completely blank cells. If a range is entirely blank, AVERAGEA will also return a #DIV/0! error.

How can I calculate the average ignoring 0 values and blank cells?

To ignore both blank cells and cells that contain the number 0, you can use the AVERAGEIF function. The formula would be =AVERAGEIF(A1:A10, "<>0"). However, if no cells meet the criteria, it will still return #DIV/0!, so wrapping it in IFERROR is still recommended.