INDEX MATCH is a combination of two separate Excel functions that allows you to look up a value in a table based on a specific criterion. While many people start with VLOOKUP, INDEX MATCH is significantly more powerful because it can look to the left, handle column insertions without breaking, and is generally more efficient for large datasets. Essentially, the MATCH function finds the position (the row or column number) of your search term, and the INDEX function retrieves the actual value from that specific position.
What You'll Need
- A computer with Microsoft Excel installed (works in all modern versions including Office 365, 2021, 2019, and 2016).
- A dataset consisting of at least two columns: one containing the unique identifier you are searching for (the "Lookup Value") and one containing the information you want to retrieve (the "Result Value").
- A basic understanding of how to click and drag to select cell ranges in a spreadsheet.
Step-by-Step
- Identify your goal: Determine exactly what you are looking for and where the answer is located. For example, imagine you have a list of Employee IDs in Column A and Employee Names in Column B. You have an ID in cell E1 and you want the name to appear in cell F1.
- Start the formula: Click on the cell where you want the result to appear (e.g., F1). Type
=INDEX(. This tells Excel that the ultimate goal is to return a value from a specific area. - Select the Result Column: While the INDEX parenthesis is still open, highlight the range of cells that contains the answer you want to find. In our example, this would be the list of names in Column B (e.g.,
B2:B100). After selecting the range, type a comma. Your formula now looks like:=INDEX(B2:B100,. - Insert the MATCH function: Now you need to tell Excel which row to look in. Inside the INDEX formula, type
MATCH(. Your formula now looks like:=INDEX(B2:B100, MATCH(. - Select the Lookup Value: Click on the cell that contains the value you are searching for. In our example, this is cell E1 (the Employee ID you typed in). Type a comma. Your formula now looks like:
=INDEX(B2:B100, MATCH(E1,. - Select the Lookup Column: Highlight the range of cells where Excel should search for that lookup value. In our example, this is the list of Employee IDs in Column A (e.g.,
A2:A100). Type a comma. Your formula now looks like:=INDEX(B2:B100, MATCH(E1, A2:A100,. - Set the Match Type: To ensure Excel finds an exact match rather than the closest approximate value, type
0. This is the most critical part for most users; without the 0, Excel may return the wrong row if your data isn't sorted alphabetically or numerically. Type a closing parenthesis for the MATCH function. Your formula now looks like:=INDEX(B2:B100, MATCH(E1, A2:A100, 0). - Close the INDEX function: Type the final closing parenthesis to complete the formula:
=INDEX(B2:B100, MATCH(E1, A2:A100, 0)). Press Enter. - Test the result: Change the value in your lookup cell (E1) to a different ID. The result in F1 should automatically update to the corresponding name from Column B.
Common Mistakes
One of the most frequent errors is mismatched range sizes. For INDEX MATCH to work, the range selected for the INDEX function and the range selected for the MATCH function must be the same height (or width). If your INDEX range is B2:B100 (99 rows) but your MATCH range is A1:A100 (100 rows), Excel will be offset by one row, and you will consistently get the wrong answer or an error.
Another common mistake is forgetting the 0 at the end of the MATCH function. By default, if you leave the match type blank, Excel assumes you want an "Approximate Match." This requires your data to be sorted in ascending order. If your data is unsorted, Excel will return the nearest value it finds, which is often completely incorrect for IDs, names, or part numbers.
Users also frequently confuse the order of the ranges. Remember: INDEX is for the Answer (what you want to see), and MATCH is for the Search (where the ID is located). If you swap these, you will likely get a #N/A error or a value from a completely unrelated column.
Tips
To make your formulas more robust, use Absolute References. If you plan to drag your formula down to fill a whole column, you must lock your ranges using dollar signs (e.g., $B$2:$B$100 instead of B2:B100). You can do this quickly by highlighting the range in the formula bar and pressing the F4 key. This prevents the lookup range from shifting downward as you copy the formula.
For those working with massive spreadsheets, consider converting your data into an official Excel Table (Insert > Table). When you use Table References (like Table1[Employee Name]) instead of cell ranges (B2:B100), the formula becomes much easier to read. Additionally, Tables expand automatically; if you add a new employee to the bottom of the list, the INDEX MATCH formula will include them without you having to manually update the range.
If you are using the newest version of Excel (Office 365), you might explore XLOOKUP. XLOOKUP is essentially a simplified version of INDEX MATCH combined into one function. However, learning INDEX MATCH is still valuable because it works in all versions of Excel and is often faster when processing tens of thousands of rows of data.
Troubleshooting
If your formula returns #N/A, it means Excel cannot find the lookup value in the specified range. First, check for leading or trailing spaces in your cells. A cell that looks like "123" but is actually "123 " (with a space at the end) will not match. You can fix this by using the TRIM function on your data.
If you see a #REF! error, it usually means the INDEX function is trying to look at a column or row that doesn't exist. This often happens if you deleted a column that the formula was referencing. To fix this, re-select your ranges in the formula bar.
If the formula returns the wrong value (but not an error), double-check your match type. Ensure there is a 0 at the end of the MATCH function. Also, verify that your INDEX and MATCH ranges start and end on the same row numbers. If INDEX starts at row 2 and MATCH starts at row 1, your result will always be one row off.
If the formula returns #VALUE!, check that you haven't accidentally selected an entire column (like A:A) for one part of the formula and a specific range (like B2:B100) for the other. While Excel can sometimes handle this, it is best practice to keep the dimensions identical.
Frequently Asked Questions
Why is INDEX MATCH better than VLOOKUP?
INDEX MATCH can look to the left, whereas VLOOKUP can only look to the right of the lookup column. It is also more stable; if you insert a new column into your table, VLOOKUP often breaks because it relies on a static column index number, while INDEX MATCH adjusts automatically.
Can I use INDEX MATCH for horizontal rows?
Yes. While most people use it for vertical columns, you can select a row for the INDEX range and a row for the MATCH range. The logic remains the same: MATCH finds the position, and INDEX retrieves the value.
Does INDEX MATCH slow down my workbook?
In very large workbooks (thousands of formulas), INDEX MATCH is generally more efficient than VLOOKUP because it only looks at the two columns necessary for the task, rather than loading the entire table array into memory.
Can I use INDEX MATCH to find multiple criteria?
Yes, though it requires a more advanced "Array Formula" approach. You can use a boolean logic string within the MATCH function (e.g., MATCH(1, (Range1=Criteria1)*(Range2=Criteria2), 0)) to find a row that meets two or more conditions.
What is the difference between INDEX and MATCH?
MATCH returns a number (the position of the item in a list), while INDEX returns the actual content of a cell based on a number provided to it. Together, they form a complete search-and-retrieve system.