IFERROR practice exercises
Catch errors like #N/A and #DIV/0! and show something friendlier with IFERROR.
- 1Hide #N/A with IFERRORIS is not in the table, so a plain VLOOKUP shows #N/A. In E2, wrap VLOOKUP(D2,A2:B6,2,FALSE) in IFERROR to show "Unknown" instead.
- 2Avoid #DIV/0! with IFERRORPremiumThe lamp has not sold yet, so B2/C2 gives #DIV/0!. In D2, wrap B2/C2 in IFERROR to show 0 instead.
- 3Catch only "not found" with IFNAPremiumE-109 is a new hire who isn't in the list yet. In E2, look up the department for D2 with VLOOKUP and wrap it in IFNA to show "Not listed" instead of #N/A.