IFERROR

Explanation

IFERROR returns an alternative result when a formula produces an error.

Syntax

=IFERROR(value,value_if_error)

Example

Sales

Units

Price

10000

100

 

5000

0

 

Normal formula:

=A2/B2

If B2 is 0, Excel returns:

#DIV/0!

Use:

=IFERROR(A2/B2,0)

Result:

Sales

Units

Price

10000

100

100

5000

0

0

IFNA

Explanation

IFNA handles specifically the #N/A error.

Syntax

=IFNA(value,value_if_na)

Example:

=IFNA(XLOOKUP(E2,A2:A10,B2:B10),”Not Found”)

Real-World Uses

  • Lookup systems
  • Sales reports
  • Employee databases
  • Error-free dashboards
  • User-friendly reports

Practice

Create a product lookup sheet and display “Not Found” instead of an error.