Excel + Google Sheets · IFERROR
Hide every #DIV/0!
Shows your own value instead of an error.
The formula
=IFERROR(A2/B2, 0)What each part means
A2/B2Your normal formula0What to show if it fails
Example
| A | B | C | |
|---|---|---|---|
| 1 | Sales | Visits | Rate |
| 2 | 30 | 600 | |
| 3 | 12 | 0 | |
| 4 | 45 | 300 | |
| 5 | 8 | 200 |
| A | B | C | |
|---|---|---|---|
| 1 | Sales | Visits | Rate |
| 2 | 30 | 600 | 5.0% |
| 3 | 12 | 0 | 0 |
| 4 | 45 | 300 | 15.0% |
| 5 | 8 | 200 | 4.0% |
Step by step
- Click cell C2.
- Type the formula:
=IFERROR(A2/B2, 0) - Press Enter.
- Drag the small square in the bottom-right corner of the cell down to copy it to the other rows.
Where it works
- Every version of Excel
- Google Sheets
- Excel for the web (free)