Introduction
Hello! I’m Vishal Kumar, the creator of ZeexasTech.com.
Welcome to your destination for AI tools, Excel tips, technology tutorials, and smart digital solutions. My aim is to simplify complex topics and share practical knowledge that helps you learn faster, boost productivity, and stay ahead in the digital world.
ZeexasTech.com — Learn Technology. Work Smarter. Grow Faster.
Excel offers several powerful functions for finding and retrieving information from large datasets. Among them, the combination of INDEX and MATCH is one of the most flexible and useful lookup techniques. Whether you work with employee records, sales reports, product lists, customer databases, or financial spreadsheets, learning how to use INDEX MATCH in Excel can make your work faster and more accurate.
Many Excel users begin with VLOOKUP because it is easy to understand. However, VLOOKUP has certain limitations, such as its inability to return values from columns to the left of the lookup column. INDEX MATCH overcomes this limitation and offers greater flexibility when working with structured data.
In this guide, you will learn what INDEX MATCH is, how its formula works, how to perform exact and approximate matches, how to look up values using multiple criteria, and how to troubleshoot common errors. You will also see practical examples that you can apply to your everyday Excel work.
By the end of this article, you will understand when to use INDEX MATCH and how it compares with other lookup functions, including VLOOKUP and XLOOKUP.
What Is INDEX MATCH in Excel?
INDEX MATCH is a combination of two Excel functions: INDEX and MATCH.
The INDEX function returns a value from a specified position within a range. The MATCH function finds the position of a particular value within a range.
When combined, MATCH identifies the position of the item you want to find, and INDEX uses that position to return the corresponding value from another range.
For example, imagine you have a table containing employee names, departments, and salaries. You want to find the salary of an employee named Rahul.
MATCH locates Rahul’s position in the employee-name column. INDEX then returns the salary from the same position in the salary column.
This approach separates the task of finding a position from the task of retrieving a value.
Why Use INDEX MATCH?
INDEX MATCH is popular because it offers several advantages:
- It can return values from columns located to the left or right of the lookup column.
- It does not depend on a fixed column number.
- It can be used for horizontal and vertical lookups.
- It supports two-way lookups using row and column positions.
- It can handle multiple lookup criteria with suitable formula patterns.
- It can be easier to maintain than VLOOKUP formulas when columns are inserted or rearranged.
Although INDEX MATCH requires understanding two functions, its flexibility makes it a valuable Excel skill.
Understanding the INDEX Function in Excel
The INDEX function returns a value or reference from a specified position in a range or array.
INDEX Formula Syntax
=INDEX(array, row_num, [column_num])
Here is what each argument means:
- array: The range containing the value you want to retrieve.
- row_num: The row position within the selected range.
- column_num: The column position within the range. It is optional when the range contains only one column.
INDEX Example
Suppose cells A2 contain the following employee names:
| Cell | Employee |
|---|---|
| A2 | Rahul |
| A3 | Priya |
| A4 | Amit |
| A5 | Neha |
| A6 | Rohan |
To return the third name in the range, use:
=INDEX(A2:A6,3)
Result: Amit
The formula returns the value in the third position of the specified range. It does not count from worksheet row 1; it counts from the beginning of the selected range.
Another INDEX Example
Suppose cells B2 contain these salaries:
| Employee | Salary |
|---|---|
| Rahul | 30000 |
| Priya | 35000 |
| Amit | 40000 |
| Neha | 45000 |
| Rohan | 50000 |
To return the fourth salary, use:
=INDEX(B2:B6,4)
Result: 45000
This example demonstrates that INDEX retrieves information based on position rather than searching for a particular name by itself.
Understanding the MATCH Function in Excel
The MATCH function searches for a specified value in a range and returns its relative position.
MATCH Formula Syntax
=MATCH(lookup_value, lookup_array, [match_type])
The arguments are:
- lookup_value: The value you want to find.
- lookup_array: The range where Excel should search.
- match_type: The type of match Excel should use.
The match type is important:
| Match type | Meaning |
|---|---|
0 | Finds an exact match |
1 | Finds the largest value less than or equal to the lookup value; the lookup range must be sorted in ascending order |
-1 | Finds the smallest value greater than or equal to the lookup value; the lookup range must be sorted in descending order |
For most ordinary lookup tasks, use 0 for an exact match.
MATCH Example
Suppose cells A2 contain the names Rahul, Priya, Amit, Neha, and Rohan.
To find the position of Neha, enter:
=MATCH("Neha",A2:A6,0)
Result: 4
Neha is the fourth item in the selected range.
Notice that MATCH returns the relative position, not the worksheet row number. Because the range starts at A2, the result is 4 even though Neha is in worksheet cell A5.
This position is what INDEX can use to retrieve a corresponding value from another range.
How to Use INDEX MATCH in Excel
Now that you understand INDEX and MATCH separately, you can combine them into a single lookup formula.
Basic INDEX MATCH Formula
=INDEX(return_range,MATCH(lookup_value,lookup_range,0))
The formula works in two stages:
- MATCH searches for the lookup value and returns its position.
- INDEX uses that position to return the corresponding value from the return range.
Step-by-Step Example
Consider this employee dataset:
| Employee | Department | Salary |
|---|---|---|
| Rahul | Sales | 30000 |
| Priya | HR | 35000 |
| Amit | IT | 40000 |
| Neha | Finance | 45000 |
| Rohan | Marketing | 50000 |
Assume the employee names are in A2 and salaries are in C2.
You want to find Neha’s salary.
Step 1: Identify the lookup value.
The lookup value is Neha.
Step 2: Identify the lookup range.
The employee names are in A2.
Step 3: Identify the return range.
The salaries are in C2.
Step 4: Enter the formula.
=INDEX(C2:C6,MATCH("Neha",A2:A6,0))
Result: 45000
MATCH finds Neha in the fourth position of A2. INDEX returns the fourth value from C2, which is 45000.
Using a Cell Reference
Instead of typing the employee name directly into the formula, you can place it in cell E2 and use:
=INDEX(C2:C6,MATCH(E2,A2:A6,0))
When E2 contains Neha, the result is 45000. If you change E2 to Rahul, the result becomes 30000.
Using a cell reference makes the formula reusable and is particularly helpful when building reports and interactive dashboards.
INDEX MATCH for an Exact Match
An exact-match lookup returns a value only when Excel finds the requested item.
To perform an exact match, use 0 as the third argument of MATCH.
=INDEX(C2:C6,MATCH(E2,A2:A6,0))
This formula searches for the employee name in E2 and returns the corresponding salary.
If the lookup value does not exist in the lookup range, the formula generally returns #N/A.
Exact-match INDEX MATCH formulas are suitable for:
- Finding employee salaries by name.
- Retrieving product prices by product ID.
- Finding customer details by customer number.
- Looking up invoice amounts by invoice ID.
- Retrieving student marks by roll number.
Best practice: Use exact-match lookups for identifiers such as employee IDs, product codes, invoice numbers, and customer IDs. Approximate matching should be used only when the data and matching rules support it.
INDEX MATCH for a Left Lookup
One of the biggest advantages of INDEX MATCH is its ability to return values from a column to the left of the lookup column.
VLOOKUP normally searches in the first column of its table array and returns values from columns to its right. INDEX MATCH does not have this restriction.
Example
Suppose your dataset contains:
| Product ID | Product Name | Price |
|---|---|---|
| P101 | Keyboard | 800 |
| P102 | Mouse | 500 |
| P103 | Monitor | 7500 |
| P104 | Printer | 6000 |
Imagine the product name is in column B and the product ID is in column A. You want to enter a product name and return its product ID.
If the product name is in E2, use:
=INDEX(A2:A5,MATCH(E2,B2:B5,0))
When E2 contains Monitor, the result is P103.
MATCH searches column B, while INDEX returns the corresponding value from column A. Because the return range can be positioned to the left of the lookup range, this is a left lookup.
This capability is useful when working with older spreadsheets in which the data layout cannot easily be changed.
INDEX MATCH for a Two-Way Lookup
A two-way lookup retrieves a value based on both a row label and a column label.
For example, you might have a sales report where rows contain employee names and columns contain months. You want to find the sales amount for a particular employee in a particular month.
Example Dataset
| Employee | January | February | March |
|---|---|---|---|
| Rahul | 12000 | 15000 | 18000 |
| Priya | 10000 | 13000 | 16000 |
| Amit | 14000 | 17000 | 20000 |
| Neha | 11000 | 14500 | 19000 |
Assume the employee names are in A2, the month headers are in B1, and the sales figures are in B2.
Suppose cell F2 contains Amit and cell G2 contains March.
Use:
=INDEX(B2:D5,MATCH(F2,A2:A5,0),MATCH(G2,B1:D1,0))
Result: 20000
The formula performs two MATCH operations:
- The first MATCH finds Amit’s row position.
- The second MATCH finds March’s column position.
- INDEX returns the value at the intersection of that row and column.
Two-way INDEX MATCH is particularly useful for monthly reports, financial models, employee performance dashboards, and product comparison tables.
INDEX MATCH with Multiple Criteria
Sometimes one condition is not enough to identify a unique record. For example, a sales report might contain multiple transactions for the same employee on different dates.
You may need to search using both the employee name and the department.
Example Dataset
| Employee | Department | Sales |
|---|---|---|
| Rahul | Sales | 12000 |
| Priya | HR | 9000 |
| Rahul | IT | 15000 |
| Neha | Finance | 11000 |
| Rahul | Sales | 18000 |
Suppose E2 contains Rahul and F2 contains IT. You want to return the sales value for the first row matching both conditions.
In modern Excel versions, you can use:
=INDEX(C2:C6,MATCH(1,(A2:A6=E2)*(B2:B6=F2),0))
Result: 15000
The formula evaluates both conditions. Each condition produces TRUE or FALSE values, which multiplication converts into 1s and 0s. A row that satisfies both conditions produces 1, and MATCH locates the first such row.
In Microsoft 365 and newer Excel versions, this formula can generally be entered normally. In older Excel versions, array formulas may require Ctrl+Shift+Enter.
If multiple rows match both conditions, this formula returns the first matching record. If no row satisfies both conditions, MATCH returns #N/A.
INDEX MATCH with Wildcards
Wildcards help you search for text when you know only part of the lookup value.
Excel supports two common wildcard characters:
*matches any number of characters.?matches a single character.
For example, suppose the product list contains Wireless Keyboard, Wireless Mouse, and Gaming Keyboard.
To find the first product containing the word Keyboard, you can use:
=INDEX(B2:B10,MATCH("*Keyboard*",B2:B10,0))
This formula returns the first matching product name in the range.
To find a product name that begins with Wireless, use:
=INDEX(B2:B10,MATCH("Wireless*",B2:B10,0))
Wildcard matching is helpful when working with product descriptions, partial names, and text fields that are not consistently entered.
Be aware that wildcard matching is primarily useful for text. It does not mean that Excel will automatically treat every partial numeric value as a match.
INDEX MATCH for Approximate Matches
INDEX MATCH can also perform approximate lookups using the MATCH function’s match-type argument.
For example, imagine you have a commission table in which sales amounts determine commission rates.
| Minimum Sales | Commission Rate |
|---|---|
| 0 | 2% |
| 10000 | 5% |
| 25000 | 8% |
| 50000 | 12% |
If the minimum-sales values are sorted in ascending order, you can use:
=INDEX(B2:B5,MATCH(E2,A2:A5,1))
If E2 contains 30000, the formula returns 8%, because 25000 is the largest threshold that does not exceed 30000.
For this approximate-match method, the lookup range must be sorted in ascending order. Incorrect sorting can produce unexpected results.
Use approximate matching for tasks such as commission calculations, tax brackets, grade thresholds, pricing bands, and other tiered systems when the table is designed for that purpose.
INDEX MATCH vs VLOOKUP
Both INDEX MATCH and VLOOKUP can retrieve values from a dataset, but they work differently.
| Feature | INDEX MATCH | VLOOKUP |
|---|---|---|
| Basic purpose | Combines position finding and value retrieval | Searches the first column of a table |
| Left lookup | Yes | Not directly |
| Right lookup | Yes | Yes |
| Fixed column number | Not required | Usually required |
| Two-way lookup | Supported with two MATCH functions | More cumbersome |
| Multiple criteria | Supported with suitable formula patterns | Requires workarounds |
| Approximate match | Supported through MATCH | Supported through its fourth argument |
| Formula complexity | Often more complex for beginners | Usually simpler for basic lookups |
| Newer Excel alternative | XLOOKUP | XLOOKUP |
Which Is Better: INDEX MATCH or VLOOKUP?
INDEX MATCH is often preferable when you need a left lookup, a two-way lookup, or a formula that is less dependent on a fixed return-column number.
VLOOKUP remains useful for simple tables in which the lookup column is the first column and the return column is to its right.
If you use Microsoft 365 or a recent Excel version, XLOOKUP is another excellent option. It can perform lookups in either direction and has a more direct formula structure for many everyday tasks.
The best function depends on your Excel version, spreadsheet layout, and the complexity of your lookup requirements.
INDEX MATCH vs XLOOKUP
XLOOKUP is available in Microsoft 365, Excel 2021, Excel 2024, and other supported newer Excel releases. It is not available in some older versions, including Excel 2016 and Excel 2019 as originally released.
For a simple lookup, XLOOKUP can be easier to read.
Using the employee dataset, the INDEX MATCH formula is:
=INDEX(C2:C6,MATCH(E2,A2:A6,0))
The equivalent XLOOKUP formula is:
=XLOOKUP(E2,A2:A6,C2:C6,"Not found")
Both formulas can return the salary associated with the employee name in E2.
XLOOKUP also makes it straightforward to specify what should be returned when a match is not found. INDEX MATCH can achieve similar error handling with IFNA.
If you are learning Excel today, it is worth understanding both INDEX MATCH and XLOOKUP. INDEX MATCH remains valuable for compatibility with older workbooks and for understanding how lookup logic works.
Common INDEX MATCH Errors and How to Fix Them
Even when the formula syntax is correct, INDEX MATCH can return errors if the data or ranges are not set up properly.
1. #N/A Error
The #N/A error usually means MATCH cannot find the lookup value.
Possible causes:
- The lookup value does not exist in the search range.
- There are extra spaces in the text.
- One value is stored as text while another is stored as a number.
- The formula uses exact matching but the values are different.
Solution: Check the spelling, data types, spaces, and selected ranges. If the lookup value may be missing, you can use:
=IFNA(INDEX(C2:C6,MATCH(E2,A2:A6,0)),"Not found")
This formula displays Not found instead of #N/A.
2. #REF! Error
The #REF! error usually indicates an invalid reference.
Possible causes:
- A referenced column or row has been deleted.
- The INDEX range is incorrect.
- A formula refers to an invalid position or reference.
Solution: Verify the ranges and arguments used in INDEX. Ensure that the requested position exists within the selected array.
3. Incorrect Result
Sometimes a formula returns a value without displaying an error, but the value is wrong.
Possible causes:
- The formula uses approximate matching unintentionally.
- The lookup and return ranges are misaligned.
- Duplicate lookup values exist.
- The wrong column or row is selected.
Solution: Use 0 in MATCH for an exact match, confirm that the lookup and return ranges start and end at corresponding records, and check whether duplicate values exist.
4. Extra Spaces in Text
A name such as Rahul may not match a cell containing Rahul followed by an extra space.
You can clean a lookup value in a helper cell with:
=TRIM(E2)
However, TRIM does not remove every type of unusual whitespace. If the source data contains nonbreaking spaces, additional cleaning may be necessary.
5. Mismatched Range Sizes
In a standard vertical lookup, the lookup and return ranges should contain the same number of corresponding rows.
For example, this is aligned:
=INDEX(C2:C100,MATCH(E2,A2:A100,0))
This formula may return an incorrect result if the ranges are misaligned:
=INDEX(C3:C100,MATCH(E2,A2:A100,0))
The return range starts one row lower than the lookup range. As a result, the position found by MATCH may point to a different record in INDEX.
Tips for Using INDEX MATCH Efficiently
Follow these practices to make your formulas easier to maintain and troubleshoot.
1. Use exact matching when appropriate. For identifiers, employee names, and product codes, MATCH(...,0) is usually the safest starting point.
2. Keep lookup and return ranges aligned. Each position in the lookup range should correspond to the same record in the return range.
3. Use cell references. References such as E2 make your formulas reusable without editing the formula every time you search for a different item.
4. Lock ranges when copying formulas. If you plan to copy a formula down a column, consider absolute references such as $A$2:$A$100 and $C$2:$C$100.
Example:
=INDEX($C$2:$C$100,MATCH(E2,$A$2:$A$100,0))
5. Handle missing values clearly. IFNA can display a friendly message when no match is found.
6. Check for duplicates. MATCH returns the position of the first match it finds. If your dataset contains duplicate identifiers, verify whether the first result is the one you want.
7. Consider Excel Tables. Structured references can make formulas easier to read when the source data is stored as an Excel Table.
8. Test formulas with known results. Before using a lookup in a business report, verify it against a few records whose expected values are already known.
Practical Uses of INDEX MATCH in Business
INDEX MATCH is useful in many real-world spreadsheet tasks.
Employee Management
Retrieve an employee’s salary, department, job title, or manager based on an employee ID.
Sales Reporting
Find monthly sales figures, product performance, or revenue generated by a particular sales representative.
Inventory Management
Return product prices, stock quantities, supplier names, or reorder levels using product codes.
Financial Analysis
Retrieve interest rates, expense categories, financial metrics, and values from forecast tables.
Student Records
Find marks, grades, attendance records, or course details based on a student ID.
Customer Databases
Retrieve customer names, contact details, account types, or order information from customer identifiers.
In each case, the main benefit is the ability to separate the lookup range from the return range, allowing the source data to be arranged in a practical way.
Frequently Asked Questions About INDEX MATCH in Excel
INDEX MATCH combines INDEX, which returns a value from a position in a range, with MATCH, which finds the position of a lookup value. Together, they provide a flexible alternative to VLOOKUP.
INDEX MATCH is more flexible for left lookups and two-way lookups. VLOOKUP is often easier for basic lookups where the lookup column is the first column of the table. The best choice depends on the task.
Yes. MATCH can search one column while INDEX returns a value from a different column to its left or right.
Use 0 as the third argument of MATCH:=INDEX(B2:B10,MATCH(E2,A2:A10,0))
This searches for an exact match to the value in E2.
Yes. You can combine logical conditions in MATCH to locate a row that satisfies multiple requirements. For example:
The formula returns the first row matching both conditions, assuming the ranges are aligned.
Yes. INDEX and MATCH are available in many older Excel versions, making the combination useful when sharing workbooks with users who do not have newer functions such as XLOOKUP.
A standard INDEX MATCH formula returns a value from the specified return range. If you need multiple columns, you can use separate formulas for each return column or use newer dynamic-array techniques where supported.
The lookup value may not exist in the selected range, the data types may differ, or the values may contain extra spaces. Check the source data and make sure the formula uses the correct ranges and matching method.
Performance depends on the workbook, formula design, data size, and Excel version. Neither formula is universally faster in every situation. For large workbooks, avoid unnecessary full-column calculations where practical and use well-structured ranges.
If you use a modern Excel version, XLOOKUP is often easier for everyday lookups. Learning INDEX MATCH is still valuable because it works in older versions and teaches the underlying principles of lookup formulas.
Conclusion
INDEX MATCH is one of the most versatile lookup techniques in Excel. By combining the position-finding ability of MATCH with the value-retrieval capability of INDEX, you can solve a wide range of spreadsheet problems.
You can use it to find employee salaries, retrieve product prices, perform left lookups, build two-way lookup formulas, and search using multiple criteria. With the correct formula structure, INDEX MATCH can also make your spreadsheets more flexible and easier to maintain.
Start by practicing the basic exact-match formula:
=INDEX(return_range,MATCH(lookup_value,lookup_range,0))
Once you understand how it works, move on to two-way lookups, multiple criteria, and approximate matching.
Whether you are a beginner, a business analyst, an accountant, or an experienced Excel user, learning INDEX MATCH will strengthen your spreadsheet skills and help you work more confidently with data.
Thank you so much for visiting ZeexasTech.com and taking the time to read my articles. Your support and interest mean a lot to me. I hope you find the information useful and enjoy exploring the website!
Best regards,
Vishal Kumar
Writer of ZeexasTech.com

2 comments