The fastest way to learn VLOOKUP is to watch a short video, but since you’re reading this, here’s the direct answer: VLOOKUP searches for a value in the first column of a table and returns a matching value from a column to the right. To use it, type =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) into a cell, press Enter, and Excel returns the result. Below, we explain the function in detail, show worked examples, and cover the common errors and alternatives—so you can master it without needing a video.
What VLOOKUP Does and Why It Matters
VLOOKUP stands for “Vertical Lookup.” It’s one of Excel’s most-used functions because it lets you pull data from one table into another based on a shared identifier. For example, you have a list of employee IDs in one sheet and their department names in another; VLOOKUP can bring the department into the first sheet automatically. It’s a core skill for anyone working with spreadsheets, from data entry to financial analysis.
The function has been in Excel for decades, so it works in every version, including Excel for Microsoft 365, Excel 2021, Excel 2019, and older versions. It also works in Google Sheets, though the syntax is identical. The main limitation is that it only looks to the right—never to the left—of the lookup column. That’s why many people eventually switch to XLOOKUP, which is more flexible, but VLOOKUP is still widely used and taught.
How VLOOKUP Works: Syntax and Arguments
The syntax is =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). Here’s what each part means:
- lookup_value – the value you want to find (e.g., a product code, name, or ID). It must be in the first column of the table.
- table_array – the range of cells that contains the data, including the lookup column and the column with the result. For example,
A2:C10. - col_index_num – the column number in the table from which to return the result. The first column is 1, the second is 2, and so on.
- range_lookup – optional. Use
FALSEfor an exact match (most common) orTRUE(or omit) for an approximate match. For exact matches, always useFALSEto avoid incorrect results.
For example, if you have a table with product IDs in column A and prices in column B, and you want to find the price for product “P123”, you’d write: =VLOOKUP("P123", A2:B100, 2, FALSE). This returns the price from column B for the row where column A equals “P123”.
Step-by-Step: How to Use VLOOKUP in Excel
Here’s a practical example. Suppose you have a sheet called “Products” with product IDs in A2:A10 and prices in B2:B10. On another sheet, you have a list of sold items with product IDs in A2:A5, and you want to fill in the prices. Follow these steps:
- Click the cell where you want the price to appear (e.g., B2 on the sales sheet).
- Type
=VLOOKUP(. - Click the cell with the lookup value (e.g., A2 on the sales sheet).
- Type a comma, then select the range on the Products sheet (e.g., Products!A2:B10). Press F4 to make it absolute (adds dollar signs) so it doesn’t change when you copy the formula down.
- Type a comma, then type
2(the column number with the price). - Type a comma, then type
FALSEfor an exact match. - Close the parenthesis and press Enter. You’ll see the price.
- Copy the formula down to fill the other rows.
The formula in B2 would look like: =VLOOKUP(A2, Products!$A$2:$B$10, 2, FALSE). If the product ID isn’t found, you’ll get #N/A.
Common VLOOKUP Errors and How to Fix Them
Most VLOOKUP problems come from a few predictable issues:
- #N/A – the lookup value isn’t found. Check for extra spaces, text vs. number formatting, or that the value actually exists.
- #REF! – the col_index_num is larger than the number of columns in the table array. For example, if your table has 3 columns, you can’t ask for column 4.
- #VALUE! – the col_index_num is less than 1, or the lookup_value is not a valid type.
- Wrong results with approximate match – if you omit the last argument, Excel assumes TRUE (approximate match). This can return the closest match, not the exact one. Always use
FALSEunless you know you need an approximate match (e.g., tax brackets). - Lookup column not first – VLOOKUP only works if the lookup value is in the first column of the table array. If it’s not, move the column or use INDEX/MATCH.
To handle errors gracefully, wrap the formula in IFERROR: =IFERROR(VLOOKUP(A2, Products!$A$2:$B$10, 2, FALSE), "Not Found"). This shows a friendly message instead of an error.
VLOOKUP vs. XLOOKUP vs. INDEX/MATCH
VLOOKUP has two major limitations: it can’t look to the left, and it breaks if you insert or delete columns within the table array. XLOOKUP, available in Excel 2021 and Microsoft 365, solves both. XLOOKUP lets you specify a lookup range and a return range independently, so you can return values from any column, left or right. It also has a built-in if_not_found argument. For example: =XLOOKUP(A2, Products!A:A, Products!B:B, "Not Found").
INDEX/MATCH is another alternative that works in all versions. It’s more flexible but longer: =INDEX(Products!B:B, MATCH(A2, Products!A:A, 0)). The 0 in MATCH means exact match. This combination is often preferred by advanced users because it’s faster on large datasets and doesn’t require the lookup column to be first.
If you’re on Microsoft 365, consider XLOOKUP for new workbooks. But if you share files with people using older Excel versions, stick with VLOOKUP or INDEX/MATCH for compatibility.
Tips for Using VLOOKUP Effectively
To get the most out of VLOOKUP, keep these tips in mind:
- Use absolute references (e.g.,
$A$2:$B$10) so the table range doesn’t shift when you copy the formula. - Sort your data if you use approximate match (TRUE). For exact match, sorting isn’t required.
- Convert your data range to an Excel Table (Ctrl+T) and use structured references like
Table1[ProductID]. This makes formulas easier to read and automatically expands when you add data. - If you’re looking up text, ensure there are no leading or trailing spaces. Use
=TRIM(A2)to clean data. - Use the VLOOKUP function in combination with other functions, like IF, to perform conditional lookups.
Frequently Asked Questions
Can VLOOKUP return a value from a column to the left? No, VLOOKUP only returns values to the right of the lookup column. If you need to return a value from the left, use INDEX/MATCH or XLOOKUP.
Why is my VLOOKUP returning #N/A even though the value exists? This usually happens because of formatting differences—like one cell is text and the other is a number—or hidden spaces. Use =TRIM(A2) to remove spaces, or convert both to the same data type. Also, ensure you’re using FALSE for exact match.
Does VLOOKUP work in Google Sheets? Yes, the syntax is the same. However, Google Sheets also has its own functions like VLOOKUP and XLOOKUP (added in 2022). The steps are identical, but the menu paths differ if you’re using the interface.
What is the difference between VLOOKUP and HLOOKUP? VLOOKUP looks up values vertically (in columns), while HLOOKUP looks up values horizontally (in rows). HLOOKUP is rarely used because data is usually organized in columns.
Can I use VLOOKUP with wildcards? Yes, you can use wildcards like * (any sequence) and ? (single character) in the lookup_value when using exact match. For example, =VLOOKUP("A*", A2:B10, 2, FALSE) finds the first value starting with “A”. This works in Excel and Google Sheets.
Is VLOOKUP case-sensitive? No, VLOOKUP is not case-sensitive by default. It treats “APPLE” and “apple” as the same. If you need case-sensitive lookup, use XLOOKUP with the match_mode argument, or use INDEX/MATCH with EXACT.
Related
- Shortcut for Going Back? Browser & App Shortcuts
- C Program to Generate a Random Number
- Data Entry Tools and Software: A Complete Guide
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel Trim a Range: Remove Extra Spaces from CellsTo trim a range in Excel, enter =TRIM(A2) beside the first value and fill the formula down; in…
- Excel Percent Change Formula and ExamplesTo calculate percent change in Excel, subtract the old value from the new value, then divide by the…
- Number Value in Excel: Use the VALUE FunctionIn Excel, use the VALUE function to convert text that represents a number into a number Excel can…
- How to Add a Formula in Excel for Addition: Simple StepsTo add numbers in Excel, select the cell where you want the answer, type a formula that starts…
- Excel INDEX MATCH No Duplicates: How to Return Only Unique MatchesThe short answer: standard INDEX MATCH returns the first match it finds, so to exclude duplicates you must…
- Using the IFS Function in Excel: Syntax and ExamplesIn Excel, use IFS to test conditions in order and return the result paired with the first condition…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.