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

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

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

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

Last reviewed: