MATCH Function in Microsoft Excel: Formula, Examples & Troubleshooting
Learn the MATCH formula in Microsoft Excel: find the relative position of a matching key, with reproducible examples, expected answers and compatibility cautions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: MATCH returns a key’s position within the selected range. Use match_type 0 for exact lookup, including the first duplicate. The default is 1, an ascending approximate lookup; −1 requires descending order.
Availability and version history
- Introduced: Introduction version not established by the official history reviewed.
- Availability: Official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Checked: October 14, 2026; official MATCH reference. Documentation check, not a new native test; existing example-verification notes retain their scope.
Syntax and original practice data
=MATCH(lookup_value, lookup_array, [match_type])
Square brackets mark optional arguments and are not typed. Examples use English function names and comma separators. Enter the original data below in A1:F9, with the Row column used only as an explanatory label. Amount and Units are numbers; other fields are text. Keep formula outputs outside the source table.
| Row | A · Item | B · Team | C · Status | D · Amount | E · Units | F · Agent |
|---|---|---|---|---|---|---|
| 1 | Item | Team | Status | Amount | Units | Agent |
| 2 | Pen | East | Paid | 120 | 12 | Ana |
| 3 | Pad | West | Pending | 75 | 5 | Bo |
| 4 | Box | East | Paid | 210 | 7 | Ana |
| 5 | Tape | North | Paid | 90 | 0 | Cy |
| 6 | Folder | West | Paid | 150 | 3 | Bo |
| 7 | Pen | East | Pending | 60 | 8 | Dee |
| 8 | Pad | West | Paid | 125 | 12 | Ana |
| 9 | Box | North | Pending | 80 | 4 | Cy |
Two original worked controls
=MATCH("Box",A2:A9,0)
=MATCH("West",B2:B9,0)
Expected positions are 3 and 2. Box first appears at A4, the third entry of A2:A9; West first appears at B3, the second entry of B2:B9. MATCH returns neither a worksheet row number nor the value from another column.
Microsoft explicitly states that exact mode returns the first matching value and that matching ignores letter case. Thus =MATCH("box",A2:A9,0) also has expected result 3.
Advanced example: retrieve a corresponding value
=INDEX(D2:D9,MATCH("Box",A2:A9,0))
Expected result: 210. MATCH supplies position 3; INDEX takes the third amount in the aligned return range. Both ranges start on row 2 and contain eight corresponding records.
If the return range were D1:D8 instead, position 3 would mean worksheet D3, returning 75. That result is numeric and plausible but represents the wrong record. Match range lengths and starting positions before adding error handling.
Advanced check: expose duplicate and missing-key behavior
=MATCH("Pen",A2:A9,0)
=MATCH("Missing",A2:A9,0)
Expected results are 1 and documented #N/A, respectively. The later Pen at position 6 does not replace the first exact occurrence. Box appears at positions 3 and 8, but exact MATCH returns 3.
If every matching record is required, one relative position cannot supply the whole result set. Use a separately documented filtering or aggregation operation and keep a stable unique key when records must be distinguishable.
Advanced example: ascending boundaries and the omitted default
On a separate sheet enter 0,10,20,50 in H2:H5:
=MATCH(35,H2:H5,1)
=MATCH(35,H2:H5)
Both expected positions are 3, because 20 is the largest value no greater than 35. Queries 1,20 and 75 return positions 1,3 and 4. The final 1 is not an instruction to search for the first exact item; it selects approximate ascending mode.
=INDEX(H2:H5,MATCH(35,H2:H5,1)) has expected value 20, distinguishing the returned position 3 from the boundary value itself. Sorting is a requirement, not an optional optimization.
Advanced example: descending mode uses the opposite bound
Put 50,20,10,0 in J2:J5:
=MATCH(35,J2:J5,-1)
=MATCH(15,J2:J5,-1)
=MATCH(5,J2:J5,-1)
Expected positions are 1,2 and 3, associated with 50,20 and 10. Each selected value is the smallest one greater than or equal to the query. Exact query 20 gives position 2.
The controls use distinct numeric boundaries in the required descending order. Results for incorrectly sorted arrays are not certified, and a warning about sorting should not be replaced by a guessed output for every malformed list.
Advanced example: locate a header horizontally
=MATCH("Amount",A1:F1,0)
=MATCH("Agent",A1:F1,0)
Expected positions are 4 and 6. A one-row range is a valid layout for locating a header. For the second original order:
=INDEX(A2:F9,2,MATCH("Amount",A1:F1,0))
Expected amount: 75. Header and data ranges share the same column origin, so the relative index has the intended meaning in both places.
Wildcards and literal punctuation
With match_type 0 and a text lookup, Microsoft documents ? and * wildcards. On the original Item column:
=MATCH("Ta*",A2:A9,0)
=MATCH("B?x",A2:A9,0)
Expected positions are 4 and 3, selecting Tape and the first Box. These patterns use Excel wildcard syntax, not regular expressions.
For a separate three-cell list A*B, AxB, A?B, the pattern A~*B finds position 1, while A~?B finds position 3. The tilde escapes the following wildcard character. A literal-looking lookup key can therefore need escaping even in exact mode.
Troubleshooting and alternatives
An unsuccessful MATCH has documented #N/A. Check the key type, whitespace, selected range, matching mode and sort direction before treating that as proof the underlying business record is absent. Numeric 123 and a text field containing its characters need separate conversion checks.
The optional modes differ from XMATCH, which has different defaults and version availability. Do not replace MATCH with another function based only on a similar name. Exact duplicate/case behavior above is documented; complete coercion and imported-file matrices remain untested.
Product-specific troubleshooting and verification
Microsoft documents Formulas → Evaluate Formula for Excel for Windows. If that command is unavailable in your client, inspect component expressions in helper cells and compare their results. This qualification does not imply the same menu exists on every platform listed above.
Related guides already published for this function: LibreOffice Calc | Apache OpenOffice Calc | Gnumeric
A corresponding guide establishes separate documentation, not guaranteed identical defaults or file-conversion behavior. See the function comparison tool and editorial testing standards.
The complete manuscript, original source table and all original formulas were reviewed on October 14, 2026. New outputs were independently calculated from explicit inputs. The existing approved availability/history section is retained exactly. No native Excel execution or complete client/type/error matrix is claimed.