ExcelFormulas logoExcelFormulas.
Ask AI
Lookup & ReferenceVerified QA Tested

INDEX & MATCH.

Combines two formulas to perform powerful two-way lookups, searching left and right.

Category: Lookup & Reference
ExcelExcel 365Excel 2021Excel 2019Google Sheets

How it works.

INDEX & MATCH is a classic power-user technique that combines two formulas. MATCH searches a range for a lookup value and returns its numeric position. INDEX takes that position and retrieves the corresponding value from another range. This is the historical alternative to VLOOKUP that allows searching to the left and is more resource-efficient.

💡 In simple terms.

MATCH finds the row number of your lookup item. INDEX uses that row number to grab the corresponding value from another column.

Everyday Analogy

"Think of MATCH like a detective finding the row number of a suspect, and INDEX like a crane going directly to that row number to pick up the package."

Formula syntax.

Standard Excel Notation
=INDEX(return_array, MATCH(lookup_value, lookup_array, [match_type]))
Tip:Arguments wrapped in square brackets [like_this] are optional; all other arguments are required.

Formula arguments.

Every parameter accepted by the INDEX & MATCH function is detailed below.

return_arrayRequired

The range containing the value you want to return.

Example value: A2:A6
lookup_valueRequired

The value you want MATCH to search for.

Example value: D2
lookup_arrayRequired

The range that MATCH searches in.

Example value: B2:B6
match_typeOptional

0 = Exact match (recommended), 1 = Less than, -1 = Greater than.

Default: 0

Simple example.

Step-by-Step Scenario

Reverse ID Lookup

Retrieve the Name of a student based on their ID (the search column is to the right of the name column).

Student NameID CodeGradeQuery IDStudent Name
EmmaST-402AST-404—
LiamST-403B——
OliviaST-404A+——
Applied Formula
=INDEX(A2:A6, MATCH(D2, B2:B6, 0))
Expected Result:Calculated output

Evaluates INDEX & MATCH over the sample table cells, placing the verified output in cell E2.

Formula generator.

Full Generator Wizard

Customize the argument fields below to generate a tailored INDEX & MATCH formula ready to paste directly into your worksheet.

Generated FormulaReady to copy

Expected result behavior.

Returns "Calculated output" based on sample evaluation criteria and active cell references.

Sample Output:Calculated output
Output Type:Text String

Best Practices

  • INDEX-MATCH works perfectly looking left, unlike VLOOKUP which can only search to the right.
  • It is excellent for two-way lookups (looking up both row and column titles) by nesting a second MATCH function inside the column argument of INDEX.

Common Mistakes

  • Be careful to match the boundaries of the ranges. If INDEX is A2:A6 and MATCH is searching B1:B6, the offset will cause incorrect values to be returned.
Compatibility Database

Platform & version compatibility.

Verified platform compatibility matrix based on actual spreadsheet calculation engine specifications.

Excel✓
Supported
Excel 365✓
Supported
Excel 2021✓
Supported
Excel 2019✓
Supported
Google Sheets✓
Supported
Microsoft Excel History & Version Availability

Core standard function supported across all modern and legacy Microsoft Excel versions (365, 2021, 2019, 2016, 2013, 2010), as well as Excel for the Web and Mac.

Google Sheets Compatibility Notes

100% compatible with Google Sheets. Uses identical argument order, data types, and standard calculation logic.

Frequently asked questions.

Technical Q&A
Why do financial analysts prefer INDEX & MATCH over VLOOKUP?↓

INDEX & MATCH does not require counting column offsets, allows leftward lookups, calculates faster in large workbooks because it reads only two columns, and never breaks when someone inserts or deletes columns.

Why is MATCH returning a #N/A error?↓

Ensure the third argument in MATCH (match_type) is explicitly set to 0 for exact matching. Also check for mismatched data types (such as numbers formatted as text).