Excel: VLookup Example

The original example can be found at TechOnTheNet.com.

Question: I have a list of #s in column A (lets say 1-20). There is a master list in another column that may not include some of the column A #s. I want a formula in column B to say (if A1 exists in the master list, then “Yes”, “No”). Is this possible?

Answer: This can be done with a formula that utilizes a combination of the VLookup function, IF function, and ISNA function.

Excel VLookup Example

Based on the spreadsheet above:

=IF(ISNA(VLOOKUP(A2,$D$2:$D$185,1,FALSE)),”No”,”Yes”) would return “No”
=IF(ISNA(VLOOKUP(A5,$D$2:$D$185,1,FALSE)),”No”,”Yes”) would return “Yes”

First, you need to enter a FALSE in the last parameter of the VLookup function. This will ensure that the VLookup will test for an exact match.

If the VLookup function does not find an exact match, it will return the #N/A error. By using the IF and ISNA functions, you can return a “Yes” value if an exact match is found. Otherwise, a “No” value is returned.

JoshStauffer.com runs on the Genesis Framework

Genesis Framework

Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go. It's that simple - start using Genesis now!

Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.

Become a StudioPress affiliate

Speak Your Mind

*