SheetsLessons
Lesson 9 · Logic

IFERROR & IFNA

Hide #DIV/0!, #N/A and #VALUE! errors in Google Sheets with IFERROR. Practice with real-world examples.

Task 1 of 3

Calculate revenue per click for the first campaign (B2 ÷ C2). Some campaigns have 0 clicks, so show 0 instead of an error.

D2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

Replacing errors with something friendlier

=IFERROR(value, [value_if_error])

IFERROR returns the result of a formula, unless that formula produces an error (#DIV/0!, #N/A, #VALUE!…). Then it returns your fallback instead.

  • =IFERROR(B2/C2, 0) returns 0 instead of #DIV/0!
  • =IFERROR(VLOOKUP(E2, A:C, 3, FALSE), "Not found") gives a friendly message for missing lookups

Use it deliberately. IFERROR hides every error, including typos in your formula. If you only want to catch missing lookups, IFNA is more precise.