Formula Errors

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

Emma BrownEmma Brown Nov 10, 2026 869 views

Question details

The user needs to resolve a #DIV/0! error that occurs when using the AVERAGE function on a range with no numeric values, while accounting for regional separator differences.

How to Fix the #DIV/0! Error in an Excel AVERAGE Formula
Product
Excel
Device & OS
not provided
Scenario
Calculating the average of a data range and rounding the result, but the range might occasionally be empty or lack numeric data.
Observed behavior
The formula =ROUND(AVERAGE(G4:G22),2) returns a #DIV/0! error instead of remaining blank or showing zero.
Before you start

Check your computer's regional settings to determine whether your system uses commas (,) or semicolons (;) to separate formula arguments.

Solution 1Recommended

Wrap the Formula in IFERROR (Comma Separator)

Use the IFERROR function to display a blank cell instead of an error when your system uses commas as argument separators.

The #DIV/0! error happens because the AVERAGE function divides the sum of the values by the count of numeric values. If there are no numbers, it divides by zero. The IFERROR function catches this error and replaces it with a value of your choice.

1
Select the formula cell

Click on the cell containing your current formula, such as =ROUND(AVERAGE(G4:G22),2).

2
Edit the formula

Click into the formula bar at the top of the worksheet and wrap the existing formula inside the IFERROR function: =IFERROR(ROUND(AVERAGE(G4:G22),2),"").

3
Apply the changes

Press Enter. Empty or non-numeric ranges will now display as a blank cell instead of showing an error.

Wrap the Formula in IFERROR (Comma Separator)
Customizing the Error Output: If you prefer the cell to show a zero instead of remaining blank, replace the empty quotation marks at the end of the formula with a 0: =IFERROR(ROUND(AVERAGE(G4:G22),2),0).
Seamless Spreadsheet Calculations

Handle Formula Errors Easily with WPS Spreadsheet

WPS Office provides a powerful, free spreadsheet tool that fully supports advanced functions like IFERROR, AVERAGE, and ROUND. It seamlessly handles Excel formulas and adapts to your regional settings automatically.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your data.
  2. 2. Select the target cell: Click on the cell where you want to calculate the average without showing errors.
  3. 3. Enter the formula: Type =IFERROR(ROUND(AVERAGE(G4:G22),2),"") in the formula bar.
  4. 4. Execute the calculation: Press Enter to instantly clean up your data presentation and hide division errors.
Fully compatible with Microsoft Excel formulas and functions (.xlsx format).Built-in error checking and formula auditing tools.Free, lightweight, and fast to install.Cross-platform support for Windows, Mac, Linux, and mobile.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the AVERAGE function return a #DIV/0! error?

The AVERAGE function calculates the sum of numbers divided by the count of numbers. If the selected range contains no numeric values (only text, blanks, or logical values), the count is zero, which mathematically results in a division by zero error.

How do I know if I should use a comma or semicolon in my formulas?

It depends on your operating system's regional settings. If your region uses a period (.) as a decimal mark (e.g., US, UK), use a comma (,). If your region uses a comma (,) as a decimal mark (e.g., many European countries), use a semicolon (;).

Does IFERROR hide all types of formula errors?

Yes, IFERROR catches and handles all standard spreadsheet errors, including #DIV/0!, #N/A, #VALUE!, #REF!, #NAME?, #NUM!, and #NULL!.

Can I use IF and ISERROR instead of IFERROR?

Yes, older versions of Excel (before 2007) required =IF(ISERROR(AVERAGE(G4:G22)),"",ROUND(AVERAGE(G4:G22),2)). However, IFERROR is much shorter, more efficient, and fully supported in modern spreadsheet software including WPS Office.