
How to Look Up and Return Values in Excel: VLOOKUP, XLOOKUP, INDEX/MATCH, FILTER, and OFFSET
One of the most common tasks in Excel is looking up a reference value and returning the result in the desired cell. Common examples include retrieving a customer name from a customer code, filling in a price from a product name, or returning values that meet multiple criteria. However, with so many functions available, it can be difficult to know which method to use.
This article covers the main ways to look up and return values in Excel in one place, including the advantages, disadvantages, and recommended use cases for each method. Examples are included to help both beginners and users looking for cleaner solutions at work.
Quick Answer: Which Method Should You Use?
- Best all-around, modern option: XLOOKUP
- When older-version compatibility matters: VLOOKUP or INDEX/MATCH
- Left-side lookups and flexible lookups: INDEX/MATCH
- When you want to return multiple results at once: FILTER
- When you need to dynamically change the reference position: OFFSET
- For simple manual tasks: Find and Replace, paste, or Power Query
Sample Data
| Product Code | Product Name | Category | Unit Price | Stock |
|---|---|---|---|---|
| P1001 | Laptop | Electronics | 950000 | 12 |
| P1002 | Mouse | Electronics | 25000 | 55 |
| P1003 | Keyboard | Electronics | 49000 | 34 |
| P1004 | Monitor | Electronics | 219000 | 8 |
| P1005 | Chair | Furniture | 89000 | 20 |
For example, assume that product code P1003 is entered in cell A10 and you want to return the corresponding product name in cell B10.
1. How to Look Up and Return a Value with VLOOKUP
This is one of the best-known lookup functions. It searches for the entered value in the first column of a table and returns a value from a column to the right.
=VLOOKUP(A10,$A$2:$D$6,2,FALSE)
This formula finds the product code in A10 in the first column of the A2:D6 range and returns the product name from the second column.
Advantages
- Widely used, with plenty of learning resources available
- Easy for beginners to learn the basic structure
- Good compatibility with older versions of Excel
Disadvantages
- Can only look up values to the right
- Requires a numeric column index, so inserting columns can easily break the formula
- Not convenient for complex conditional lookups
Recommended Use Case
It is suitable when your organization still uses older versions of Excel and you only need a simple code-to-result lookup.
2. How to Look Up and Return a Value with XLOOKUP
XLOOKUP is a modern lookup function that addresses many of VLOOKUP’s limitations. Microsoft support documentation and practical comparison resources describe it as a function that can replace VLOOKUP, HLOOKUP, and INDEX/MATCH in many cases.
=XLOOKUP(A10,$A$2:$A$6,$B$2:$B$6)
Advantages
- Can look up values in either direction, left or right
- Uses separate lookup and return ranges, making the structure clear
- Makes it easy to specify text to display when no match is found
Disadvantages
- Not available in older versions of Excel
- Sharing files can cause problems if work computers use older versions
Recommended Formula for Workbooks
=XLOOKUP(A10,$A$2:$A$6,$D$2:$D$6,"Not found")
This looks up the unit price for the product code and displays “Not found” if there is no match.
3. How to Look Up and Return a Value with INDEX/MATCH
INDEX returns a value at a specified position, while MATCH finds the position of a value. Combining the two functions enables highly flexible lookups. Microsoft support documentation also presents INDEX/MATCH as an alternative to VLOOKUP.
=INDEX($B$2:$B$6,MATCH(A10,$A$2:$A$6,0))
Advantages
- Supports left-side lookups
- More resilient to inserted or deleted columns
- Well suited to expanding into multiple-criteria lookups
Disadvantages
- The structure may feel difficult for beginners
- Can become difficult to manage as formulas get longer
Recommended Use Case
Use this approach when XLOOKUP is unavailable but you need a method that is more stable and flexible than VLOOKUP.
4. How to Return Multiple Values at Once with FILTER
FILTER returns multiple rows that meet a condition at once. Unlike VLOOKUP or XLOOKUP, which return one value in one cell, it is especially powerful when you need to spill all matching results at once. It is also frequently mentioned alongside XLOOKUP and INDEX/MATCH in comparison articles.
=FILTER(A2:D6,C2:C6="Electronics")
This displays only the rows whose category is Electronics.
Advantages
- Immediately displays multiple matching results
- Useful for creating reports and dashboards
- Can produce clean results without helper columns
Disadvantages
- Not available in older versions that do not support dynamic arrays
- Works differently from traditional lookups that return a single value
5. How to Return a Value by Shifting the Reference Position with OFFSET
OFFSET refers to a value a specified number of rows and columns away from a starting cell. It is not directly a lookup function, but when combined with MATCH, it can calculate a position dynamically and return a value.
=OFFSET(A2,MATCH(A10,A2:A6,0)-1,1)
This formula finds the product code and then returns the value one column to the right in the matching row.
Advantages
- Useful for creating flexible reference ranges
- Well suited to dynamic charts and dynamic range settings
Disadvantages
- Can be difficult to read
- As a volatile function, it can affect performance with large amounts of data
- Less intuitive than XLOOKUP or INDEX/MATCH for lookup-only tasks
6. When Should You Use HLOOKUP?
HLOOKUP is used to find values in horizontally arranged tables. However, most working tables are structured vertically, so it is used less often. In many cases, XLOOKUP can replace it.
=HLOOKUP(B1,$A$1:$E$3,3,FALSE)
7. Find and Replace, Manual References, and Power Query
Find and Replace
It is fast for one-time edits but cannot be automated.
Direct Cell References
They are quick for simple sheets with fixed positions but are fragile when the data changes.
Power Query
This method merges two tables using a common reference value to add the desired values. It is highly effective for recurring tasks and large-scale data cleanup, but it has a learning curve for beginners.
Comparison Table: Advantages and Disadvantages by Method
| Method | Advantages | Disadvantages | Recommended Use Case |
|---|---|---|---|
| VLOOKUP | Simple, familiar, compatible with older versions | Right-side lookups only; fragile column index | Simple lookups, older-version environments |
| XLOOKUP | Intuitive, supports left-side lookups, convenient error handling | Not supported in older versions | Modern Excel, most work tasks |
| INDEX/MATCH | Flexible, stable, supports left-side lookups | More difficult for beginners | Older versions when flexibility is needed |
| FILTER | Returns multiple results at once | Unavailable in versions without dynamic array support | Outputting lists by condition |
| OFFSET | Supports dynamic references | Readability and performance concerns | Special dynamic references |
| Power Query | Excellent for merging large datasets | Requires initial learning | Recurring cleanup tasks |
Which Method Should You Choose at Work?
- You use modern Excel: Start with XLOOKUP
- You need to return multiple results as a list: FILTER
- Older-version compatibility is important: INDEX/MATCH
- The task is very simple and the people you share with are familiar with it: VLOOKUP
- You have many recurring merge tasks: Power Query
Common Errors and How to Fix Them
| Issue | Cause | Solution |
|---|---|---|
| #N/A | The lookup value does not exist or contains different spaces | Use TRIM or CLEAN, or verify an exact match |
| #VALUE! | Range sizes do not match | Check the sizes of lookup_array and return_array |
| Returns the wrong value | Approximate match setting | Use FALSE as VLOOKUP’s fourth argument and 0 in MATCH |
| Ranges shift when copying formulas | Relative references | Use $ to lock absolute references |
Related Articles
- Practical Uses of the Excel OFFSET Function
- Complete Guide to the Latest Excel Functions
- How to Solve 10 Common Excel Beginner Problems
Conclusion
There is more than one way to look up a value and return it in the desired cell in Excel. The most important thing is not knowing the most functions, but choosing the right method for the situation. For modern versions, XLOOKUP is the best all-around choice; use FILTER when you need multiple results, and INDEX/MATCH remains powerful when older-version compatibility and flexibility are important. Rather than relying on only one method, choose the most appropriate option based on your data structure and sharing environment.
FAQ
Which is better, VLOOKUP or XLOOKUP?
If you use modern Excel, XLOOKUP is more convenient in most cases.
How can I look up a value to the left?
Use XLOOKUP or INDEX/MATCH.
How can I return multiple rows that meet a condition at once?
FILTER is the best function for this.