IFERROR and Error-Proofing Formulas
Handle errors without hiding real problems.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
Help me handle spreadsheet errors properly. App: [SPREADSHEET_APP]. The formulas that produce errors and their error types: [FORMULAS_AND_ERRORS]. Sample data (fake): [SAMPLE_DATA]. Return a table: Error | Typical cause | How to diagnose | Safe fix. Cover #N/A, #DIV/0!, #VALUE!, #REF!, #NAME?, #NUM!, and spill errors, with a specific example of each from my formulas where possible. Then explain the difference between hiding an error and handling it. Show these patterns: - IFNA for expected "not found" cases: =IFNA(XLOOKUP(...), "Missing"), instead of IFERROR, which hides every error type. - Protect division: =IF(B2=0, "", A2/B2) or =IFERROR(A2/B2, 0) only when zero is the right answer. - Return an empty string versus zero, and the effect on sums and charts. - Add a check column that counts errors in a range (SUMPRODUCT(--ISERROR(range))) and a summary flag. - Use ISNUMBER and ISTEXT to validate inputs. - Document assumptions in a note. Provide a rule set for when to use IFERROR (rarely, with a clear fallback), when to fix the data, and when to show the error on purpose. Add test cases for my formulas and a checklist for a final review before sharing.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.
See an example result (fictional data)
Error | Cause | Diagnose | Fix #N/A | lookup value missing | check spaces, text vs number | =IFNA(XLOOKUP(...), "Missing") #DIV/0! | divides by zero | blank denominator | =IF(B2=0, "", A2/B2) #VALUE! | text in math | ISNUMBER test | clean the data #REF! | deleted column | trace precedents | rebuild reference Rule: IFERROR hides every error type, so use IFNA for expected "not found". Add a check cell: =SUMPRODUCT(--ISERROR(A2:A100)) should be 0, with a red flag if not.
Illustrative only, made-up data. Your results will differ and must be reviewed.