Advanced · Lesson 10 of 12

Understanding error messages

Errors are clues

An error tells you what kind of problem to look for. #N/A means a lookup found nothing. #DIV/0! means dividing by zero. #VALUE! means the wrong kind of data. #REF! means a cell is gone. #NAME? means a misspelled word.

Fix the cause first

Start by finding out why the error happened. A lookup might fail because of a stray space, which TRIM can fix inside the formula.

=XLOOKUP(TRIM(E2),A2:A5,B2:B5)

Use IFERROR with care

IFERROR shows a backup value when something goes wrong. It hides every error, including real mistakes, so only use it where you expect one.

=IFERROR(A2/B2,0)

Try the practice problems for this lesson

Next lesson: Formulas that fill many cells