To retrieve data from a table in Excel, you can use VLOOKUP for simple, rightward searches, or the INDEX MATCH combination for flexible, bidirectional lookups. VLOOKUP is a single function that finds a value in the first column of a range and returns a value in the same row from a specified column to the right. INDEX MATCH is a nested formula where MATCH finds the row number of a search term and INDEX retrieves the value from that specific row and column, allowing you to look up data to the left of your search key.
What You'll Need
- Microsoft Excel (any modern version)
- A dataset organized in rows and columns (a table or range)
- A unique identifier (the "lookup value") that exists in both your source data and your target cell
Step-by-Step
How to use VLOOKUP
- Identify your lookup value: Click on the cell that contains the value you want to search for (e.g., an Employee ID in cell G2).
- Select the table array: Highlight the range of cells containing your data. Ensure the column containing the lookup value is the leftmost column in this selection.
- Define the column index number: Count from the left of your selected range to the column containing the data you want to retrieve. For example, if your range is A:C and you want data from column C, your index number is 3.
- Set the range lookup: Type FALSE (or 0) for an exact match, or TRUE (or 1) for an approximate match. Most business data requires an exact match.
- Assemble the formula: In the target cell, type
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). Example:=VLOOKUP(G2, A2:C100, 3, FALSE).
How to use INDEX MATCH
- Start with the INDEX function: Type
=INDEX(and then select the column or range that contains the actual answer you want to return. This is the "result column." - Add the MATCH function for the row: After the first comma in the INDEX function, type
MATCH(. - Define the MATCH lookup value: Select the cell containing the value you are searching for (e.g., the Employee ID in cell G2).
- Define the MATCH lookup array: Select the single column in your dataset that contains the lookup values. This column can be anywhere—to the left or right of your result column.
- Set the MATCH type: Type 0 for an exact match. Close the MATCH parenthesis.
- Close the INDEX function: Close the final parenthesis. The complete formula structure looks like:
=INDEX(result_column, MATCH(lookup_value, lookup_column, 0)). Example:=INDEX(A2:A100, MATCH(G2, C2:C100, 0)).
Common Mistakes
One of the most frequent errors with VLOOKUP is forgetting to use the FALSE argument for the range lookup. By default, if left blank, Excel assumes TRUE, which looks for an approximate match. If your data is not sorted alphabetically or numerically, VLOOKUP will often return the wrong value or a misleading result without warning.
Another common mistake is using a relative reference for the table array. When you drag a VLOOKUP or INDEX MATCH formula down a column, the range (e.g., A2:C100) shifts down as well (A3:C101, A4:C102). This causes the formula to "miss" data at the top of the list. Always use absolute references (dollar signs) to lock your ranges, such as $A$2:$C$100.
Users often struggle with the column index number in VLOOKUP. If you insert a new column into your table, the index number does not update automatically. If your formula was looking at column 3 and you insert a column at B, your target data is now in column 4, but the formula still pulls from column 3, resulting in the wrong data being displayed.
In INDEX MATCH, a common error is selecting ranges of different sizes. If your INDEX range is A2:A100 (99 rows) but your MATCH range is C2:C105 (104 rows), Excel may return a #N/A error or the wrong value because the row indices no longer align perfectly.
Tips
To make your formulas easier to manage, convert your data range into an official Excel Table (Ctrl + T). Tables use "Structured References," meaning instead of $A$2:$C$100, your formula will look like Table1[EmployeeData]. This makes the formula readable and ensures that as you add new rows to the bottom of the table, the lookup range expands automatically without needing to update the formula.
If you are using a modern version of Excel (Microsoft 365 or Excel 2021), consider using XLOOKUP. XLOOKUP combines the simplicity of VLOOKUP with the flexibility of INDEX MATCH. It doesn't require a column index number and defaults to an exact match, reducing the chance of manual errors.
When working with very large datasets, INDEX MATCH is generally more efficient than VLOOKUP. VLOOKUP requires Excel to load the entire table array into memory, whereas INDEX MATCH only looks at the two specific columns involved in the search. This can significantly reduce file lag in workbooks with thousands of rows.
Combine your lookup functions with IFERROR to clean up your spreadsheets. Instead of seeing #N/A when a value isn't found, you can wrap your formula like this: =IFERROR(VLOOKUP(...), "Not Found"). This provides a professional appearance and makes it clear when data is missing rather than suggesting a formula error.
Troubleshooting
If your formula returns #N/A, the most likely cause is that the lookup value does not exist in the search column. However, it is often a formatting issue. Check if one value is stored as "Text" and the other as a "Number." Even if they look identical, Excel treats them differently. Use the VALUE() function or the "Text to Columns" tool to standardize the format of both columns.
If you are getting the wrong value, check for leading or trailing spaces. A cell containing "Apple " (with a space) is not the same as "Apple". You can fix this by using the TRIM() function on your lookup range or your lookup value to remove invisible whitespace.
If you see #REF!, this typically happens in VLOOKUP when the column index number is larger than the number of columns in the selected range. For example, if your range is A:B (2 columns) but your index number is 3, Excel cannot find a third column and returns a reference error.
If the formula returns a 0 instead of a blank cell, it is because Excel treats an empty cell in the result range as a zero. To avoid this, you can append an empty string to the end of your formula (e.g., =VLOOKUP(...) & ""), though this converts the result to text.
Frequently Asked Questions
Can VLOOKUP look to the left?
No, VLOOKUP can only search the leftmost column of a range and retrieve data to the right. To look to the left, you must use INDEX MATCH or XLOOKUP.
Is INDEX MATCH harder to learn than VLOOKUP?
It has a slightly steeper learning curve because it requires two functions instead of one, but it is more powerful and less prone to breaking when the table structure changes.
Why does my VLOOKUP return the wrong row?
This usually happens because the fourth argument (range_lookup) was omitted or set to TRUE, and your data is not sorted. Ensure you use FALSE for exact matches.
Do I need to sort my data for INDEX MATCH?
No. As long as you use 0 as the final argument in the MATCH function, your data can be in any order.
Which one is faster for large files?
INDEX MATCH is generally faster because it only references the necessary columns rather than the entire table array.
What happens if there are duplicate values in the lookup column?
Both VLOOKUP and INDEX MATCH will return the first match they encounter starting from the top of the range. They cannot return multiple matches without advanced array formulas.