Expires in:
In this article you will learn how to use Excel's IFERROR function to replace NA and other error values with custom text or numbers. I show practical examples from a weather dataset, explain when to use zeros versus text placeholders, and cover common pitfalls. This guide is for analysts and Excel users who want cleaner outputs and more reliable downstream calculations.

What You'll Learn / Key Take-Aways
- How IFERROR works and the exact syntax: =IFERROR(value, value_if_error).
- Why you should write the full formula first, then wrap it in IFERROR.
- Practical examples for replacing NA with text like "other" or numeric values like 0.
- The impact of replacing errors on filters, dependent columns, and aggregation.
- When to use IFERROR versus IFNA and why replacing certain errors can distort analyses.
## Why use IFERROR
IFERROR is an easy, front end and back end tool. On the front end it makes reports and dashboards look polished by removing ugly error symbols. On the back end it lets you standardize values so formulas that aggregate or categorize data wont break.
Errors in Excel include #N/A, #DIV/0!, #VALUE!, #REF!, #NAME?, and #NUM!. IFERROR catches all of these and substitutes whatever you choose as the fallback value.
Use cases:
- Replace #N/A with a descriptive label when you are categorizing rows.
- Replace errors with 0 so SUM, AVERAGE, and other numeric aggregations can run.
- Hide user-facing error messages in dashboards to improve presentation.
## IFERROR syntax and a recommended workflow
The function is very simple:
=IFERROR(value, value_if_error)
- value is the expression or formula that might produce an error.
- value_if_error is what you want shown instead of the error.
A reliable workflow I use and teach is:
1. Build and test your full formula first. Confirm it returns expected results for valid inputs.
2. Once the formula is correct, wrap it in IFERROR and choose an appropriate fallback.
That keeps debugging simple because you are not hiding errors while building logic.
## Practical example: weather dataset
Imagine you have daily temperature readings and a freeze flag formula in column I. Some temperature cells are NA and that triggers errors in downstream columns J and K.
Original freeze formula (example):
=IF(B2<=32, "yes", "no")
If B2 is NA this will produce an error. To handle that, wrap the full formula in IFERROR:
=IFERROR(IF(B2<=32, "yes", "no"), "other")
Steps to apply across a column:
1. Click the cell that contains your working formula.
2. Edit the formula to prepend IFERROR( and add your fallback after a comma.
3. Close with a parenthesis and press Enter.
4. Fill or drag the formula down to apply it to the rest of the column.
After doing this the NA values will show "other" instead of an error. Any columns that depended on the previous error cells should now calculate correctly.
Numeric example: replacing NA with zero
If you need numeric output so averages and sums compute without error, use a numeric fallback. For example:
=IFERROR(VALUE(C2), 0)
This will convert C2 to a number when possible and return 0 when the conversion fails or C2 is an error.
## IFERROR versus IFNA and older techniques
- IFERROR catches all standard Excel errors. It is simple and broad.
- IFNA only catches #N/A, and leaves other errors alone. Use IFNA when you specifically want to handle missing data but still be alerted to other logical errors.
- Older patterns used ISERROR or IF(ISERROR(...), ...). IFERROR is shorter and supported in modern Excel.
## Effects on filters and dependent calculations
Replacing error values changes filter lists and pivot outputs. For example, a column that once showed #N/A in filters will now show whatever fallback you used. That is often desirable for readability, but be aware it changes the value set used in grouping and counting.
When you replace errors with text like "other" you will get counts for that label in your filters and pivot tables. When you replace with 0 you will change sums and averages, which can bias results if 0 is not an appropriate representation of the missing value.
## Additional Tips, Pitfalls to Avoid & Pro Advice
- Do not hide errors while you are developing formulas. Build and test first, then wrap with IFERROR.
- Keep the raw source column untouched if possible. Create a derived column for the cleaned values so you can always go back to originals.
- Choose fallbacks intentionally. Use text like "other" or "missing" when the value is unknown. Use 0 only if zero is a meaningful substitute.
- Remember IFERROR masks all errors. If you expect different types of errors and want different handling, use ISERROR or specific error checks or IFNA for #N/A only.
- If you need to preserve data type, ensure the fallback matches the expected type. A text fallback in a numeric column will force the whole column to text if you are not careful.
## Quick checklist before using IFERROR
- Have I tested the base formula without IFERROR? Yes or no.
- Is the fallback type appropriate for downstream calculations? Yes or no.
- Do I need to keep the original values? If yes, write to a new column.
## FAQ
### What does IFERROR do in Excel?
IFERROR evaluates a formula. If the formula returns an error it returns the fallback you provide. If the formula evaluates without error it returns the formula result.
### How do I replace #N/A with another value?
Wrap the original formula in IFERROR and supply your replacement. Example: =IFERROR(your_formula, "other"). You can also use IFNA if you only want to catch #N/A.
### Should I replace missing values with zero?
Only when zero is a meaningful representation of the missing data. Using zero can change sums and averages and may bias analysis. Consider using a label like "missing" if you only want to categorize rows without affecting numeric aggregates.
### How do I apply IFERROR across a whole column?
Edit the formula in the first cell, wrap it with IFERROR and the fallback value, then fill down or double click the fill handle to apply to the range.
### What is the difference between IFERROR and IFNA?
IFERROR catches any Excel error. IFNA catches only #N/A. Use IFNA when you want to handle missing values but still see other errors during debugging.
## Summary of Key Points / Take-Home Messages
- IFERROR is a convenient way to replace error outputs with custom values and improve presentation.
- Write and test your full formula first, then wrap in IFERROR to avoid hiding logic bugs.
- Choose your fallback carefully. Text fallbacks alter categories, numeric fallbacks change aggregates.
- Consider using IFNA when you only want to handle #N/A. Preserve originals when possible so you can audit changes.
- Small cleanup steps like this make downstream calculations and filters more reliable and reports more professional.






