How to Calculate Compliance Rate in Excel with IFERROR
Question details
The user needs to write an Excel formula to calculate a compliance rate while using IFERROR to prevent division by zero errors.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating a compliance percentage based on total items and non-compliant items while handling potential errors from empty or zero-value cells.
- Observed behavior
- Without error handling, dividing by a total of zero or an empty cell results in a #DIV/0! error during the compliance rate calculation.
Ensure that your total value cell and non-compliance value cell both contain numeric data, and identify their exact cell references before applying the formula.
Apply the IFERROR Function with a Multiplier
Use this method to calculate the compliance rate and display it as a standard number out of 100 while completely avoiding #DIV/0! errors.
This formula manually calculates the percentage by multiplying the decimal result by 100. It is ideal if you want your result formatted as a standard number rather than using Excel's built-in percentage format.
Click on the cell where you want the final compliance rate to be displayed.
Type the formula =IFERROR((E3-K13)/E3*100, 0) into the formula bar, replacing E3 with your Total cell and K13 with your Non-compliances cell.
Press Enter to view the calculated rate. The result will display as a numerical percentage (e.g., 95 for 95%).

Calculate and Apply Percentage Formatting
If you prefer to use Excel's built-in percentage formatting, use a modified formula without the *100 multiplier.
Calculate Compliance Rates Easily in WPS Spreadsheet
WPS Office provides a powerful, free alternative to Microsoft Excel with complete support for advanced functions like IFERROR. You can calculate compliance rates, format percentages, and manage complex data effortlessly.
- 1. Open your data: Launch WPS Spreadsheet and open the workbook containing your compliance data.
- 2. Input the formula: Select the destination cell and input =IFERROR((E3-K13)/E3, 0).
- 3. Execute the calculation: Press Enter to compute the compliance rate as a decimal.
- 4. Format as percentage: Click the Percentage icon on the Home tab to instantly format the result.

Frequently Asked Questions
Why am I getting a #DIV/0! error without IFERROR?
A #DIV/0! error occurs when a formula attempts to divide a number by zero or an empty cell. In the compliance rate formula, if your 'Total' cell (e.g., E3) is completely empty or contains a 0, Excel cannot compute the division. Using IFERROR catches this error and replaces it with a value you specify, such as 0.
Can I display a blank cell instead of a zero when an error occurs?
Yes. If you prefer the cell to look empty when there is an error, change the last part of your formula to use double quotation marks instead of a zero. For example, use the formula =IFERROR((E3-K13)/E3*100, "").
Why does my compliance rate show as 10000%?
This happens if you include the *100 multiplier in your formula while also applying Excel's built-in Percentage formatting. To fix this, choose one method: either use the *100 and leave the cell formatted as General, or remove the *100 from the formula and apply the Percentage format from the Home ribbon.




