Introduction
INDEX and MATCH are powerful Excel functions for finding and returning data from tables. They are especially useful when your lookup data is not arranged in a simple vertical format. In this chapter, you will practice INDEX, MATCH, and combined INDEX-MATCH formulas using employee, product, student, sales, and business data. The questions become more practical as you move through the chapter. INDEX, MATCH Excel Practice questions with solutions to help you understand the concepts.
Question 1: Find an Employee’s Department Using INDEX-MATCH
Problem Statement
Use the Employee ID to find the department of each employee.
Excel Data
| Employee ID | Employee | Department | Salary |
|---|---|---|---|
| E101 | Rahul | IT | 45000 |
| E102 | Priya | HR | 42000 |
| E103 | Amit | Sales | 38000 |
| E104 | Neha | Finance | 50000 |
| E105 | Arjun | IT | 48000 |
Search Data
| Employee ID | Department |
|---|---|
| E103 | |
| E101 | |
| E105 | |
| E102 | |
| E104 |
Excel Solution
In the Department column, enter:
=INDEX($C$2:$C$6,MATCH(A9,$A$2:$A$6,0))
Copy the formula down.
Expected Output
| Employee ID | Department |
|---|---|
| E103 | Sales |
| E101 | IT |
| E105 | IT |
| E102 | HR |
| E104 | Finance |
Concepts Covered
INDEXMATCH- Exact matching
- Lookup using an employee ID
Question 2: Find a Product Price Using INDEX-MATCH
Problem Statement
Use the Product ID to find the corresponding product price.
Excel Data
| Product ID | Product | Category | Price |
|---|---|---|---|
| P101 | Keyboard | Accessories | 850 |
| P102 | Mouse | Accessories | 550 |
| P103 | Monitor | Display | 12500 |
| P104 | Webcam | Accessories | 2200 |
| P105 | Headset | Audio | 1800 |
Search Data
| Product ID | Price |
|---|---|
| P104 | |
| P101 | |
| P105 | |
| P103 | |
| P102 |
Excel Solution
In the Price column, enter:
=INDEX($D$2:$D$6,MATCH(A9,$A$2:$A$6,0))
Copy the formula down.
Expected Output
| Product ID | Price |
|---|---|
| P104 | 2200 |
| P101 | 850 |
| P105 | 1800 |
| P103 | 12500 |
| P102 | 550 |
MATCH finds the position of the Product ID, while INDEX returns the price from the same position.
Question 3: Return a Value Using INDEX and a Known Position
Problem Statement
Sometimes you already know the position of an item in a list. Use INDEX to return the corresponding employee name.
Excel Data
| Position | Employee |
|---|---|
| 1 | Rahul |
| 2 | Priya |
| 3 | Amit |
| 4 | Neha |
| 5 | Arjun |
Search Data
| Position | Employee |
|---|---|
| 4 | |
| 2 | |
| 5 | |
| 1 | |
| 3 |
Excel Solution
In the Employee column, enter:
=INDEX($B$2:$B$6,A9)
Copy the formula down.
Expected Output
| Position | Employee |
|---|---|
| 4 | Neha |
| 2 | Priya |
| 5 | Arjun |
| 1 | Rahul |
| 3 | Amit |
Concepts Covered
INDEX- Position-based lookup
- Returning values from a range
Question 4: Find the Position of a Product Using MATCH
Problem Statement
Use MATCH to find the position of each Product ID in the product list.
Excel Data
| Product ID | Product |
|---|---|
| P101 | Keyboard |
| P102 | Mouse |
| P103 | Monitor |
| P104 | Webcam |
| P105 | Headset |
Search Data
| Product ID | Position |
|---|---|
| P103 | |
| P105 | |
| P101 | |
| P104 | |
| P102 |
Excel Solution
In the Position column, enter:
=MATCH(A9,$A$2:$A$6,0)
Copy the formula down.
Expected Output
| Product ID | Position |
|---|---|
| P103 | 3 |
| P105 | 5 |
| P101 | 1 |
| P104 | 4 |
| P102 | 2 |
MATCH returns the relative position of the matching value.
Question 5: Find Student Marks Using INDEX-MATCH in Excel
Problem Statement
Use the student’s Roll Number to find their Maths marks.
Excel Data
| Roll No. | Student | Maths | Science | English |
|---|---|---|---|---|
| 101 | Rahul | 88 | 82 | 91 |
| 102 | Priya | 76 | 89 | 84 |
| 103 | Amit | 92 | 95 | 88 |
| 104 | Neha | 68 | 74 | 79 |
| 105 | Arjun | 55 | 63 | 70 |
Search Data
| Roll No. | Maths Marks |
|---|---|
| 103 | |
| 105 | |
| 101 | |
| 104 | |
| 102 |
Excel Solution
Enter:
=INDEX($C$2:$C$6,MATCH(A9,$A$2:$A$6,0))
Copy the formula down.
Expected Output
| Roll No. | Maths Marks |
|---|---|
| 103 | 92 |
| 105 | 55 |
| 101 | 88 |
| 104 | 68 |
| 102 | 76 |
Question 6: Perform a Two-Way INDEX-MATCH Lookup
Problem Statement
A company stores monthly sales for each salesperson. Find the sales amount using both the salesperson’s name and the month.
Excel Data
| Salesperson | January | February | March | April |
|---|---|---|---|---|
| Rahul | 45000 | 48000 | 52000 | 55000 |
| Priya | 42000 | 46000 | 49000 | 53000 |
| Amit | 38000 | 41000 | 45000 | 47000 |
| Neha | 50000 | 54000 | 57000 | 61000 |
| Arjun | 48000 | 51000 | 55000 | 59000 |
Search Data
| Salesperson | Month | Sales |
|---|---|---|
| Priya | March | |
| Neha | April | |
| Rahul | February | |
| Arjun | January | |
| Amit | March |
Excel Solution
Enter:
=INDEX($B$2:$E$6,MATCH(A9,$A$2:$A$6,0),MATCH(B9,$B$1:$E$1,0))
Copy the formula down.
Expected Output
| Salesperson | Month | Sales |
|---|---|---|
| Priya | March | 49000 |
| Neha | April | 61000 |
| Rahul | February | 48000 |
| Arjun | January | 48000 |
| Amit | March | 45000 |
Concepts Covered
This is called a two-way lookup.
The first MATCH finds the salesperson’s row.
The second MATCH finds the month’s column.
INDEX returns the value where the two positions intersect.
Question 7: Handle Missing Values with INDEX-MATCH
Problem Statement
Find an employee’s salary using the Employee ID. If the ID does not exist, display "Employee Not Found" instead of an error.
Excel Data
| Employee ID | Employee | Salary |
|---|---|---|
| E101 | Rahul | 45000 |
| E102 | Priya | 42000 |
| E103 | Amit | 38000 |
| E104 | Neha | 50000 |
| E105 | Arjun | 48000 |
Search Data
| Employee ID | Salary |
|---|---|
| E103 | |
| E109 | |
| E101 | |
| E110 | |
| E105 |
Excel Solution
Enter:
=IFERROR(INDEX($C$2:$C$6,MATCH(A9,$A$2:$A$6,0)),"Employee Not Found")
Copy the formula down.
Expected Output
| Employee ID | Salary |
|---|---|
| E103 | 38000 |
| E109 | Employee Not Found |
| E101 | 45000 |
| E110 | Employee Not Found |
| E105 | 48000 |
Concepts Covered
IFERRORINDEXMATCH- Error handling
Question 8: Find the Salesperson with the Highest Sales
Problem Statement
Find:
- The highest sales amount.
- The salesperson who achieved that amount.
Excel Data
| Salesperson | Sales |
|---|---|
| Rahul | 45000 |
| Priya | 62000 |
| Amit | 51000 |
| Neha | 78000 |
| Arjun | 69000 |
Excel Solution
Find the highest sales amount:
=MAX(B2:B6)
Then find the salesperson:
=INDEX(A2:A6,MATCH(MAX(B2:B6),B2:B6,0))
Expected Output
| Result | Value |
|---|---|
| Highest Sales | 78000 |
| Salesperson | Neha |
Concepts Covered
MAXINDEXMATCH- Lookup using a calculated result
Question 9: Find the Cheapest Product Using INDEX-MATCH
Problem Statement
Find the product with the lowest price and return both the product name and its category.
Excel Data
| Product | Category | Price |
|---|---|---|
| Keyboard | Accessories | 850 |
| Mouse | Accessories | 550 |
| Monitor | Display | 12500 |
| Webcam | Accessories | 2200 |
| Headset | Audio | 1800 |
Excel Solution
Find the lowest price:
=MIN(C2:C6)
Find the product:
=INDEX(A2:A6,MATCH(MIN(C2:C6),C2:C6,0))
Find the category:
=INDEX(B2:B6,MATCH(MIN(C2:C6),C2:C6,0))
Expected Output
| Result | Value |
|---|---|
| Lowest Price | 550 |
| Product | Mouse |
| Category | Accessories |
This technique is useful when you need to return information associated with the minimum or maximum value.
Question 10: Build a Two-Way Product Price Lookup
Problem Statement
A company has different prices for the same product in different cities.
Use the Product and City to find the correct price.
Excel Data
| Product | Delhi | Mumbai | Bangalore | Chennai |
|---|---|---|---|---|
| Keyboard | 850 | 900 | 880 | 870 |
| Mouse | 550 | 600 | 580 | 570 |
| Monitor | 12500 | 13000 | 12800 | 12700 |
| Webcam | 2200 | 2300 | 2250 | 2150 |
| Headset | 1800 | 1900 | 1850 | 1750 |
Search Data
| Product | City | Price |
|---|---|---|
| Monitor | Mumbai | |
| Mouse | Delhi | |
| Headset | Chennai | |
| Keyboard | Bangalore | |
| Webcam | Mumbai |
Excel Solution
Enter:
=INDEX($B$2:$E$6,MATCH(A9,$A$2:$A$6,0),MATCH(B9,$B$1:$E$1,0))
Copy the formula down.
Expected Output
| Product | City | Price |
|---|---|---|
| Monitor | Mumbai | 13000 |
| Mouse | Delhi | 550 |
| Headset | Chennai | 1750 |
| Keyboard | Bangalore | 880 |
| Webcam | Mumbai | 2300 |
This is a practical two-way lookup that combines two MATCH functions with INDEX.
Key Takeaways
INDEXreturns a value from a specific position in a range.MATCHfinds the position of a value inside a range.INDEX-MATCHcombines both functions to create flexible lookups.MATCH(...,0)performs an exact match.INDEX-MATCHcan return values from columns located to the left or right of the lookup column.- Two-way
INDEX-MATCHcan search by both row and column. IFERRORcan make lookup formulas easier to use when a value does not exist.INDEX-MATCHcan be combined withMAXandMINto find information associated with the highest or lowest value.- These formulas are useful for employee records, inventory, sales reports, student marks, price lists, and dashboards.
FAQs
1. What does INDEX do in Excel?
INDEX returns a value from a specified position within a range.
Example:
=INDEX(A2:A6,3)
This returns the third value from the range.
2. What does MATCH do in Excel?
MATCH finds the position of a value in a range.
Example:
=MATCH("Amit",A2:A6,0)
The 0 specifies an exact match.
3. What is INDEX-MATCH in Excel?
INDEX-MATCH combines INDEX and MATCH to find a value based on another value.
Example:
=INDEX(C2:C10,MATCH(A2,A2:A10,0))
MATCH finds the position, and INDEX returns the corresponding value.
4. Why is 0 used in MATCH?
0 tells Excel to find an exact match.
=MATCH(A2,B2:B10,0)
This is commonly used with employee IDs, product IDs, names, and other exact lookup values.
5. What is a two-way INDEX-MATCH lookup?
A two-way lookup uses one MATCH to identify a row and another MATCH to identify a column.
For example, you can find a specific salesperson’s sales for a specific month.
6. Can INDEX-MATCH look to the left?
Yes. Unlike traditional VLOOKUP, INDEX-MATCH can return a value from a range that is positioned to the left of the lookup range.
7. How can I handle #N/A with INDEX-MATCH?
Use IFERROR:
=IFERROR(INDEX(C2:C10,MATCH(A2,A2:A10,0)),"Not Found")
8. Can INDEX-MATCH find the highest value?
Yes. For example:
=INDEX(A2:A10,MATCH(MAX(B2:B10),B2:B10,0))
This returns the name associated with the highest value.
9. Can INDEX-MATCH find the lowest value?
Yes. For example:
=INDEX(A2:A10,MATCH(MIN(B2:B10),B2:B10,0))
This returns the name associated with the lowest value.
10. Is INDEX-MATCH still useful when XLOOKUP is available?
Yes. XLOOKUP provides a modern lookup approach, while understanding INDEX and MATCH is useful for working with existing Excel files, older Excel versions, and more complex lookup logic.
Written by Shubhranshu Shekhar, who has trained 20000+ students in coding.
