FormulaCraft

How to combine VLOOKUP with IF in Excel and Google Sheets

Topic:VLOOKUP
Excel & Google Sheets
=IF(ISNA(VLOOKUP(A2,$C$2:$D$5,2,FALSE)),"Not found",VLOOKUP(A2,$C$2:$D$5,2,FALSE))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Identify your lookup value (e.g. A2), your lookup table (e.g. C2:D10), the column index (2 for the second column), and whether you need exact match (FALSE).
  2. 2Wrap the VLOOKUP in ISNA to check if it returns #N/A: =ISNA(VLOOKUP(A2,$C$2:$D$10,2,FALSE)).
  3. 3Place the ISNA check inside IF: =IF(ISNA(VLOOKUP(...)),"Not found",VLOOKUP(...)) — the first argument tests for errors, the second is the fallback, the third is the successful result.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Can I use IF to apply logic to the VLOOKUP result rather than just handle errors?

Yes. For example, =IF(VLOOKUP(A2,$C$2:$D$10,2,FALSE)>100,"High","Low") looks up a value and then categorizes it based on the returned number.

More on VLOOKUP

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: