🔀 Logic
IFERROR Formula for Logic
Show a custom value instead of an error. Copy-paste ready for Excel, Google Sheets, and Airtable.
=IFERROR(A1/B1,"N/A")When you need this: When you divide sales (A1) by quantity (B1), prevent #DIV/0! errors if quantity is zero — show "N/A" instead.
How it works
- 1Execute the formula (A1/B1) inside IFERROR.
- 2If the formula works, return the result.
- 3If any error occurs (#DIV/0!, #N/A, #REF!, etc.), return the error value ("N/A").
Variations
IFERROR with VLOOKUP
=IFERROR(VLOOKUP(E1,A1:D100,3,FALSE),"Not Found")IFERROR returning zero
=IFERROR(A1/B1,0)Related Formulas
IF — Return different values based on a conditionLogicIFS — Check multiple conditions (cleaner than nested IF)LogicAND / OR — Check if multiple conditions are trueLogicCHOOSE — Return value based on index numberLogic
Need a formula that's not here?
Generate custom formula →