TGViewer
MS Excel for Data Analysis MS Excel for Data Analysis @excel_analyst ยท 73.2K subscribers
Post #2235 3.2K
๐Ÿ“Š Excel Basics #18 โ€“ IFERROR() Function

The IFERROR() function helps you handle errors gracefully by displaying a custom message or value instead of Excel error codes. It's one of the most useful functions for creating professional reports and dashboards.

๐Ÿ“Œ What is the IFERROR() Function?
The IFERROR() function checks whether a formula returns an error.
โ€ข If no error occurs, it returns the formula's result.
โ€ข If an error occurs, it returns the value you specify.

Syntax:
=IFERROR(value, value_if_error)

๐Ÿ“Œ Example 1 โ€“ Avoid Division by Zero
Without IFERROR():
=A2/B2
If B2 = 0, Excel returns: #DIV/0!

With IFERROR():
=IFERROR(A2/B2,"Cannot Divide")

Result:
โ€ข If B2 = 10 โ†’ Returns the calculated value.
โ€ข If B2 = 0 โ†’ Returns "Cannot Divide".

๐Ÿ“Œ Example 2 โ€“ Return 0 Instead of an Error
=IFERROR(A2/B2,0)
If an error occurs, Excel returns 0 instead of an error message.

๐Ÿ“Œ Example 3 โ€“ Handle Lookup Errors
=IFERROR(VLOOKUP(E2,A2:C10,3,FALSE),"Not Found")
If the value isn't found, Excel displays "Not Found" instead of #N/A.

๐Ÿ“Œ Common Excel Errors
โ€ข #DIV/0! โ†’ Division by zero.
โ€ข #N/A โ†’ Value not found.
โ€ข #VALUE! โ†’ Incorrect data type.
โ€ข #REF! โ†’ Invalid cell reference.
โ€ข #NAME? โ†’ Misspelled function or name.
โ€ข #NUM! โ†’ Invalid numeric value.
โ€ข #NULL! โ†’ Incorrect range reference.

๐Ÿ“Œ Real-World Uses
โœ… Display "Not Available" for missing data
โœ… Prevent lookup formulas from showing errors
โœ… Build clean dashboards without error messages
โœ… Improve the appearance of reports shared with stakeholders

๐Ÿ“Œ Common Mistakes
โŒ Using IFERROR() to hide errors without fixing the root cause
โŒ Returning misleading values that make debugging difficult
โŒ Wrapping every formula unnecessarily

โœ… Best Practices
โœ… Use IFERROR() only when errors are expected
โœ… Choose meaningful replacement values like "Not Found" or "No Data" instead of leaving users confused.
โœ… Fix the underlying issue whenever possible rather than simply hiding the error.
โœ… Combine IFERROR() with lookup functions like VLOOKUP(), XLOOKUP(), and INDEX()/MATCH() for professional spreadsheets.

The IFERROR() function makes your Excel workbooks cleaner, easier to understand, and more user-friendly.

Double Tap โค๏ธ For More
  • โค 14
More from @excel_analyst
  1. Oct 9, 2026Hey guys, Today, Iโ€™m covering some Excel interview questions that often pop up in data anaโ€ฆ
  2. Oct 9, 2026๐Ÿ‡ฎ๐Ÿ‡ณ ๐—š๐—ข๐—ฉ๐—˜๐—ฅ๐—ก๐— ๐—˜๐—ก๐—ง ๐—ข๐—™ ๐—œ๐—ก๐——๐—œ๐—” โ€” ๐—”๐—œ๐—–๐—ง๐—˜ ๐—œ๐—ก๐—ง๐—˜๐—ฅ๐—ก๐—ฆ๐—›๐—œ๐—ฃ๐—ฆ ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ ๐Ÿš€โ€ฆ
  3. Oct 8, 2026๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ Upgrโ€ฆ
  4. Oct 7, 2026๐Ÿ“Š Excel Shortcuts โ€” Part 5 This part focuses on Tables, Filters & Data Analysis shortcutsโ€ฆ
  5. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  6. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’