In general, the best way to do this is to use the IFNA function.

However, the IFERROR function can also be used in the same way.

Both options are explained below.

Untrapped #N/A error with VLOOKUP

VLOOKUP function

The VLOOKUP function performs a lookup operation on vertical data.

However, you may want to return a more friendly result.

you could do this by combining VLOOKUP with the IFNA function.

Untrapped #N/A error with VLOOKUP

The difference is that IFERROR will catchother errorsas well.

Note: The #N/A error is Excel’s way of telling you a value was not found.

For example, if you have a typo in your formula, Excel might return the #NAME!

Untrapped #N/A error with VLOOKUP

Or, if rows/column are deleted in a worksheet, a formula might return a #REF!

For these reasons, I prefer to use IFNA when the purpose is to trap #N/A errors only.

IFERROR is an elegant way to trap and manage errors without using more complicated nested IF statements.

Untrapped #N/A error with VLOOKUP

Excel formula error codes

How to use VLOOKUP

Untrapped #N/A error with VLOOKUP

Excel formula: VLOOKUP with numbers and text

Excel formula: VLOOKUP if blank return blank

Excel formula: VLOOKUP two-way lookup

Excel formula: Merge tables with VLOOKUP

Excel formula: VLOOKUP calculate grades

Excel formula: How to fix the #N/A error

Excel VLOOKUP function

Excel IFERROR function

Excel IFNA function

Excel ISNA function

Article image

Article image