What IFERROR does
IFERROR lets you choose what a report shows when a calculation fails. It leaves successful results unchanged. Both arguments are required.
Practical examples
Keep a valid cost per item
Enter a total cost of 180 in A2 and an item count of 12 in B2.
=IFERROR(A2/B2,"Check item count")
The result is 15, because 180 divided by 12 succeeds. The fallback text is unused.
Flag an order with no item count
Enter a total cost of 90 in A3 and 0 in B3.
=IFERROR(A3/B3,"Check item count")
The result is Check item count. Division by zero produces #DIV/0!, so IFERROR returns the supplied message.
Common mistakes and notes
A fallback can hide a broken formula
Handled errors include #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, and #NULL!. If a fallback appears unexpectedly, remove IFERROR temporarily and inspect the original error.
Zero and empty text carry different meanings
Choose 0 only when a numeric zero is appropriate. Use "" for empty text, or quote a message such as "Check input". Returning zero does not prove the underlying calculation equals zero.
IFERROR does not test your business rules
An incorrect result that produces no error passes through unchanged. Use IF for conditions such as rejecting a negative quantity.