The Complete VLOOKUP Tutorial for Data Wizards
How to do a VLOOKUP in excel: From Beginner to Expert

VLOOKUP stands as a mighty tool within Excel, offering both power and versatility.
It grants you the ability to search for a value within a table and fetch a related value from a different column.
Through this article, we’re diving deep into the world of VLOOKUP. You’ll gain a comprehensive understanding of how it works, including:
- What is VLOOKUP, and how does it work?
- When and why should you use VLOOKUP?
- How do I write a VLOOKUP formula in Excel?
- What are the common errors and limitations of VLOOKUP, and how can you avoid them?
- How do I use VLOOKUP with other functions and features in Excel?
🔌 Plug-in
Before we continue with this article, make sure to elevate your data skills with my expert eBooks—the culmination of my experiences and insights.
Support my work and enhance your journey. Check them out:

- eBook 1: Personal INTERVIEW Ready “SQL” CheatSheet
- eBook 2: Personal INTERVIEW Ready “Statistics” Cornell Notes
- Best Selling eBook: Top 50+ ChatGPT Personas for Custom Instructions
- Data Science Bundle (Cheapest): The Ultimate Data Science Bundle: Complete
- ChatGPT Bundle (Cheapest): The Ultimate ChatGPT Bundle: Complete
💡 Checkout for more such resources: https://codewarepam.gumroad.com/
What is VLOOKUP, and how does it work?
VLOOKUP is short for Vertical Lookup.
It’s a handy tool that finds a value in the first column of a table, then gives you a value from the same row but in a different column.
Here’s how you use VLOOKUP:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])VLOOKUP’s parameters are pretty straightforward:
lookup_value:
This is the value you’re trying to find within the first column of your table.
It could be anything—a number, some text, a reference to another cell, or even a formula that figures out a value for you.
table_array:
This points to the cell range that holds your data table. Make sure the first column has the values you’re looking up.
This table could be right on the sheet you’re working on, on a different sheet, or even in another workbook.
col_index_num:
This is the column number in your table from which you’d like to pull a value.
Counting starts at 1 for the first column, 2 for the second, and so on.
[range_lookup]:
This optional bit lets you choose between finding an exact match or the closest thing to it.
Skip it or say TRUE, and VLOOKUP will fetch the nearest value that’s not greater than your lookup value.
Choose FALSE, and it’ll stick to finding an exact match or return an error if there’s no match at all.
When and why should you use VLOOKUP?
VLOOKUP shines when you’re dealing with a big table of data and need to pull out specific information based on a certain key.
Imagine you’re working with a hefty spreadsheet. Here’s how VLOOKUP can make your life easier:
- Quickly find a product’s price using its name or code.
- Get an employee’s salary by searching for their name or job title.
- Dig up a contact’s phone number or email by their name or the company they work for.
With VLOOKUP, you can ditch the tedious manual searches, sorting, or filtering.
Plus, it helps keep your data error-free and consistent, saving you both time and headaches.
How do I write a VLOOKUP formula in Excel?
Crafting a VLOOKUP formula in Excel is also pretty straightforward. Just follow these steps:
Step 1:
First, figure out the lookup value, the table array, the column index number, and whether you’re going for an exact or approximate match.
Step 2:
Click on the cell where you want the answer to pop up.
- Kick things off with an equals sign (=),
- type in “VLOOKUP,” and
- crack open a parenthesis “(”.
Step 3:
For your first trick, slide in the lookup value.
This could be directly typed in, plucked from another cell, or the outcome of a different formula.
Follow it up with a comma (,).
Step 4:
Next, define the table array. That’s where your data lives.
You can drag across it with your mouse, or, jot down its address.
Hit it with another comma (,).
Step 5:
Now, tell Excel which column to peek into for your answer by entering the column index number.
This is just a simple digit.
Yep, you guessed it, another comma (,).
Step 6:
Lastly, decide if you’re in the market for an exact match or if close enough is good enough by choosing TRUE or FALSE for the range lookup.
Cap it off with a closing parenthesis “)”.
Hit Enter, and voilà, your result magically appears.
For instance, if you’ve got a list of goodies and their prices from A2 to B10 and you’re on a mission to find out how much a “Pen” costs, listed in cell D2.
Here’s how your VLOOKUP formula in cell E2 would look like:
=VLOOKUP(D2,A2:B10,2,FALSE)This formula takes a peek at cell D2, where “Pen” is written, in the first column of our table from A2 to B10.
It then brings back the value from the second column of that same row.
We’ve set the range lookup to FALSE, ensuring the formula hunts for an exact match. If it can’t find one, it’ll let us know with an error.
What are the common errors and limitations of VLOOKUP, and how can you avoid them?
VLOOKUP is mighty useful but comes with a few quirks and limits you should know about. Here are some of them:
1. #N/A error:
This pops up when VLOOKUP can’t find your lookup value in the table’s first column.
Maybe there’s a typo, a formatting mismatch, or the value just isn’t there.
Here’s how to dodge this error:
- Double-check the spelling and formatting in both your lookup value and the table. They need to match perfectly.
- Stick to using FALSE for the range lookup option. This makes sure VLOOKUP either finds an exact match or reports an error. Using TRUE without a properly sorted table could give you wrong or unexpected results.
- Wrap your VLOOKUP in an IFERROR function to swap the error message with something more helpful, like “Not found”:
=IFERROR(VLOOKUP(D2,A2:B10,2,FALSE),"Not found")2. #REF! error:
This one shows up if VLOOKUP’s trying to grab data from a cell or range that doesn’t exist.
Maybe there’s a mistake with your table array or column index number, or perhaps they’ve been deleted.
Avoid this by:
- Ensure your table array and column index are correct and still there. If you’re using references or formulas for them, make sure those aren’t causing errors either.
- Use absolute references or named ranges to keep your table array constant, even if you move or copy the formula. Like this:
=VLOOKUP(D2,$A$2:$B$10,2,FALSE)3. Limit to searching the first column:
VLOOKUP only looks in the table’s first column for your value.
If your target is elsewhere, you might need to shuffle your table or try another approach, like combining INDEX and MATCH.
For instance, if you need to find a product’s name based on its price:
=INDEX(A2:A10,MATCH(D2,B2:B10,0))This uses MATCH to find the price in cell D2 within B2:B10, then INDEX fetches the corresponding product name from A2:A10.
4. Vertical search only:
VLOOKUP is all about vertical lookups, meaning it searches columns and returns row information.
For horizontal searches, you’ll need HLOOKUP.
Say you have product names and prices in A2:E2 and want to find a price in A3:
=HLOOKUP(A3,A2:E2,2,FALSE)This digs through the first row for “Pen” and brings back the price from the second row.
HLOOKUP works similarly to VLOOKUP but flips the direction from vertical to horizontal.
How do I use VLOOKUP with other functions and features in Excel?
VLOOKUP isn’t just a standalone star; it’s a team player that works wonders when paired with other Excel functions and features, enabling you to craft more intricate and dynamic formulas.
1. Mix VLOOKUP with IF, AND, OR for conditional lookups based on various criteria.
For example, if you want to find a product’s price but only if it’s in stock and rated above 4, your formula might look like this:
=IF(AND(VLOOKUP(D2,A2:C10,3,FALSE)>0,
VLOOKUP(D2,A2:C10,2,FALSE)>4),
VLOOKUP(D2,A2:C10,4,FALSE),"")This checks:
- if the product in D2 is listed in table A2:C10,
- verifies stock status and ratings in the third and second columns, respectively, and
- returns the price from the fourth column if all’s good.
If not, it leaves the cell empty.
2. Pair VLOOKUP with CHOOSE, INDIRECT for flexible lookups based on changing inputs.
Say you’re deciding which column’s value to fetch based on a selection in cell E2:
=VLOOKUP(D2,A2:C10,CHOOSE(E2,1,2,3),FALSE)This formula finds:
- the product in D2 within A2:C10 and
- uses CHOOSE to pick the column based on E2’s value.
Allowing you to dynamically select between the product name, its rating, or stock level.
3. Combine VLOOKUP with SUM, AVERAGE, COUNT for calculations on returned values.
To sum up the total price of all in-stock products:
=SUMPRODUCT(VLOOKUP(D2:D10,A2:C10,3,FALSE),
VLOOKUP(D2:D10,A2:C10,4,FALSE))Here, VLOOKUP fetches stock status and price for products in D2:D10 from A2:C10, and SUMPRODUCT calculates the total value of all stocked items.
4. Use VLOOKUP with data validation and conditional formatting to make your worksheets interactive and visually appealing.
- Implement a dropdown in D2 for product selection, then use VLOOKUP for displaying its price in E2.
- Conditional formatting can highlight specific cells based on your set criteria, like signaling errors or highlighting standout data.
By integrating VLOOKUP with these tools, you elevate your Excel game, making your spreadsheets not just more powerful, but also more intuitive and engaging for users.
Conclusion
Wrapping up our VLOOKUP guide, it’s clear this tool is a game-changer for anyone looking to work smarter with Excel data.
Practice is key to unlocking its full potential—start applying it in your projects, learn from each attempt, and don’t shy away from experimenting.
Your journey doesn’t end here. Share your successes and discoveries with others, and keep exploring Excel’s vast capabilities.
Join my community of learners! Subscribe now and instantly receive 2 FREE eBooks: “1000 Money Making ChatGPT Prompts” and “Full Stack Data Science Project Prompts.” — https://yourdataguide.substack.com/
Note: This article contains some plugins for my eBooks. If you like my content, please make sure to support me and appreciate my work. As MPP is not yet available in India, I make some cash through these.






