3 Types of Lookup in Excel: VLOOKUP, INDEX MATCH, and XLOOKUP
In this article
Excel lookup functions allow you to search for a specific value in one part of a spreadsheet and retrieve corresponding information from another location. This guide covers the three most essential lookup methods—VLOOKUP, INDEX MATCH, and XLOOKUP—designed for anyone from beginners managing simple lists to advanced analysts handling massive datasets.
1. VLOOKUP (Vertical Lookup)
VLOOKUP is the most widely used lookup function in Excel, designed to search for a value in the leftmost column of a table and return a value in the same row from a specified column to the right. It requires four arguments: the lookup value, the table array, the column index number, and a range lookup (TRUE for approximate or FALSE for exact). This function is ideal for simple, static tables where the unique identifier is always positioned as the first column of the data range.
One of the primary reasons VLOOKUP remains popular is its simplicity for quick tasks, such as pulling a product price based on a SKU number. However, it has a critical limitation: it cannot look to the left. If your unique ID is in Column C and the data you want to retrieve is in Column A, VLOOKUP cannot perform this task without rearranging your entire data structure. Additionally, VLOOKUP can be fragile; if you insert a new column into your table, the column index number remains static, which often leads to the formula returning the wrong data or a #REF! error.
To use VLOOKUP effectively, always ensure your lookup value is in the first column of the selected range. For example, if you are looking up an employee ID in a range from A2 to D100 and want the name from the second column, your formula would look like =VLOOKUP("EMP123", A2:D100, 2, FALSE). The "FALSE" argument is vital here, as it tells Excel to find an exact match; omitting it or using "TRUE" can result in incorrect data if the list is not sorted alphabetically or numerically.
2. INDEX MATCH
INDEX MATCH is not a single function but a combination of two functions that work together to provide a more flexible and powerful alternative to VLOOKUP. The MATCH function finds the position (the row or column number) of a value in a range, and the INDEX function then retrieves the value from a specific position within a different range. By nesting MATCH inside INDEX, you create a dynamic lookup system that can search in any direction—left, right, up, or down.
The primary advantage of INDEX MATCH is its resilience to structural changes. Unlike VLOOKUP, which relies on a hard-coded column index number, INDEX MATCH references specific ranges. If you insert or delete columns within your dataset, the references update automatically, preventing your formulas from breaking. This makes it the professional choice for complex financial models or large databases where the spreadsheet layout might evolve over time.
Furthermore, INDEX MATCH is generally more efficient in terms of processing power when dealing with thousands of rows. Because VLOOKUP requires Excel to load the entire table array into memory, it can slow down a workbook. INDEX MATCH only looks at the specific columns needed for the search and the result. For example, to find a client name based on an account number where the name is to the left of the ID, you would use =INDEX(A2:A100, MATCH("ACC99", B2:B100, 0)). Here, MATCH finds which row "ACC99" occupies in column B, and INDEX pulls the corresponding value from that same row in column A.
3. XLOOKUP
XLOOKUP is the modern successor to both VLOOKUP and INDEX MATCH, introduced to simplify the lookup process while retaining all the power of its predecessors. It replaces the need for column index numbers and complex nesting by allowing you to simply select a lookup array and a return array. XLOOKUP is available in Microsoft 365 and Excel 2021, offering a streamlined syntax that defaults to an exact match, eliminating the common error of forgetting the "FALSE" argument in VLOOKUP.
XLOOKUP solves the "left-lookup" problem natively and provides built-in error handling. Instead of wrapping your formula in an IFERROR function to hide #N/A results, XLOOKUP has a dedicated "if_not_found" argument. This allows you to specify a custom message, such as "Not Found" or "Check ID", directly within the function. It also supports search modes, allowing you to search from the bottom of a list upward—a feature that is incredibly useful for finding the most recent entry in a chronological log.
A practical example of XLOOKUP would be =XLOOKUP("PROD-50", A2:A500, C2:C500, "Invalid SKU"). In this scenario, Excel searches for "PROD-50" in the range A2:A500 and returns the corresponding value from C2:C500. If the SKU does not exist, it returns the text "Invalid SKU". This level of integration makes the formula shorter, easier to read, and significantly harder to break during data entry or sheet reorganization.
How to Choose
Choosing the right lookup method depends on your version of Excel and the complexity of your data. If you are using Microsoft 365 or Excel 2021, XLOOKUP should be your default choice. It is faster to write, easier to audit, and handles errors and bidirectional lookups without extra steps. It effectively renders VLOOKUP obsolete for most modern users.
If you are working in an environment where files must be compatible with older versions of Excel (such as Excel 2010 or 2013), you cannot use XLOOKUP. In these cases, you must choose between VLOOKUP and INDEX MATCH. Use VLOOKUP for very simple, small tables where the lookup key is on the far left and the table structure will never change. Use INDEX MATCH for any professional-grade workbook, large datasets, or situations where you need to retrieve data to the left of your search key.
Another deciding factor is performance. In massive spreadsheets with tens of thousands of formulas, INDEX MATCH often outperforms VLOOKUP because it doesn't require the computer to process a large table array. While XLOOKUP is efficient, the sheer flexibility of INDEX MATCH remains a gold standard for power users who need absolute control over how the search is executed across multiple sheets or named ranges.
Frequently Asked Questions
Why am I getting a #N/A error with my lookup?
A #N/A error usually means the lookup value was not found. Common causes include leading or trailing spaces in your cells, searching for a number stored as text, or forgetting to set the range lookup to FALSE in VLOOKUP.
Can I look up values based on multiple criteria?
Yes. While VLOOKUP cannot do this natively, you can use XLOOKUP by joining criteria using the ampersand (e.g., =XLOOKUP(Val1&Val2, Range1&Range2, ReturnRange)) or by using an INDEX MATCH array formula.
Does XLOOKUP work in all versions of Excel?
No, XLOOKUP is only available in Microsoft 365 and Excel 2021. If you share a file containing XLOOKUP with someone using Excel 2016, they will see a #NAME? error in those cells.
Which is faster: VLOOKUP or INDEX MATCH?
INDEX MATCH is generally faster and more efficient, especially in large datasets, because it only references the specific columns involved rather than the entire table array.
How do I handle errors without XLOOKUP?
For VLOOKUP and INDEX MATCH, wrap your formula in the IFERROR function. For example: =IFERROR(VLOOKUP(...), "Not Found"). This replaces the #N/A error with your custom text.
Final Thoughts
Mastering these three lookup methods transforms Excel from a simple grid into a powerful relational database. While VLOOKUP is the classic starting point, transitioning to INDEX MATCH or XLOOKUP provides the stability and flexibility needed for professional data management. By selecting the tool that matches your Excel version and data structure, you can ensure your spreadsheets remain accurate and easy to maintain.