How to Fix the #DIV/0! Error in Excel AVERAGE Formulas
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.

- 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.
Check your computer's regional settings to determine whether your system uses commas (,) or semicolons (;) to separate formula arguments.
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.
Click on the cell containing your current formula, such as =ROUND(AVERAGE(G4:G22),2).
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),"").
Press Enter. Empty or non-numeric ranges will now display as a blank cell instead of showing an error.

Adjust Formula Separators for Regional Settings (Semicolon)
Modify the formula to use semicolons if your operating system uses commas as decimal separators.
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. Open your workbook: Launch WPS Spreadsheet and open the file containing your data.
- 2. Select the target cell: Click on the cell where you want to calculate the average without showing errors.
- 3. Enter the formula: Type =IFERROR(ROUND(AVERAGE(G4:G22),2),"") in the formula bar.
- 4. Execute the calculation: Press Enter to instantly clean up your data presentation and hide division errors.

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.




