Home  /  Blog  /  Lookup & Filter
Lookup & Filter

MATCH Function in Excel — With Examples (Exact, Approximate, INDEX MATCH)

By admin 28 November 2026 Lookup & Filter

VLOOKUP gives you a value. MATCH gives you a position. =MATCH("Priya", A2:A11, 0) does not return “Priya” — it returns 2, because Priya is the second rep in the list. That number is the point: feed it to INDEX and you get any value from that row, in any direction VLOOKUP cannot go. This guide gives you that function first, then runs it on the ten-order sales table, so you can check each answer yourself — exact match, approximate match in both directions, wildcards, the two-column check, and the INDEX MATCH combination — plus the one warning that matters: if you leave the match type out, it defaults to 1, and on unsorted data it returns a plausible wrong answer.

Quick takeaway: MATCH answers “which row is this in?” — INDEX answers “what is in that row?”

  • =MATCH(lookup_value, lookup_array, [match_type]) — the value, one row or one column, and the match type.
  • The result is a position number, relative to the range — not a worksheet row number.
  • 0 is exact match, first hit wins, no sorting needed. Use it almost every time.
  • 1 is approximate, largest value less than or equal, array sorted ascending. -1 is approximate, smallest value greater than or equal, array sorted descending.
  • Leave match_type out and it defaults to 1 — the most common source of wrong-looking answers.
  • Text comparison is not case-sensitive. With 0, the wildcards ? and * work.
MATCH Function in Excel — With Examples (Exact, Approximate, INDEX MATCH)

The Syntax — Value, Array, Match Type

=MATCH(lookup_value, lookup_array, [match_type])
ArgumentRequiredWhat it does
lookup_valueYesThe value to find — a number, text, a logical value, or a cell reference to one of these
lookup_arrayYesThe range to search. It must be a single row or a single column — a two-dimensional range returns #N/A
match_typeNo0 exact, 1 approximate ascending, -1 approximate descending. Defaults to 1 if you leave it out

The position MATCH returns is relative to the range, not to the worksheet. In the table below, “Priya” is in worksheet row 3, but =MATCH("Priya", A2:A11, 0) returns 2 — she is the second item in the range A2:A11. That is the number INDEX needs.

The Worked Table — Exact Match

Every example below uses the same ten-order sales table from the COUNTIF, SUMIF and UNIQUE articles — Rep, Region, Sales, Order Date, Status, Notes — in rows 2 to 11. Every result was checked against it.

FormulaResultWhy
=MATCH("Priya", A2:A11, 0)2Priya is the second rep in the range
=MATCH(2400, C2:C11, 0)32400 is the third sales figure
=MATCH("East", B2:B11, 0)1East is the first region — row 2 is East
=MATCH("Alex", A2:A11, 0)1Alex appears three times, and MATCH always returns the first match
=MATCH(999, C2:C11, 0)#N/A999 is not in the Sales column
=MATCH("Central", B2:B11, 0)#N/ACentral is not in the Region column
=MATCH("A*", A2:A11, 0)1The wildcard * matches any characters — Alex is first
=MATCH("J*", A2:A11, 0)3Jordan is the third rep

Read the rows. MATCH scans from the top and stops at the first equal value, so duplicates always return the first occurrence — Alex is at positions 1, 5 and 10, and MATCH returns 1. And the two #N/A rows are the honest answers: the value is not there, so there is no position to return. Wrap the formula in IFERROR or ISNUMBER when you need a word instead of an error — =IF(ISNUMBER(MATCH(999, C2:C11, 0)), "Yes", "No") gives “No”.

The Three Match Types — Exact, Approximate, Descending

match_typeMeaningSort order requiredTypical use
0Exact match. Returns the position of the first cell equal to lookup_value.NoneIDs, names, codes; almost every lookup
1 (default)Approximate. Returns the position of the largest value less than or equal to lookup_value.AscendingTax slabs, grade bands, commission tiers
-1Approximate. Returns the position of the smallest value greater than or equal to lookup_value.DescendingThresholds listed high to low, such as discount cut-offs

Take the grade thresholds 0, 60, 70, 80, 90 — sorted ascending — and run all three types on the same scores:

Score=MATCH(score, thresholds, 1)=MATCH(score, thresholds, 0)What it means
591#N/A0 is the largest value ≤ 59; 59 is not in the list
783#N/A70 is the largest value ≤ 78 — the C band
905590 is the largest value ≤ 90, and it is also an exact match
955#N/A90 is the largest value ≤ 95; 95 is not in the list

The same score, two different answers — and both are right, for their match type. The approximate match does not look for the score; it looks for the band the score falls in. And the descending version, on thresholds listed high to low — 90, 80, 70, 60, 0 — gives the mirror image: =MATCH(78, thresholds, -1) returns 2, because 80 is the smallest value greater than or equal to 78.

The Default-1 Bug — The Most Common Wrong Answer

Leave match_type out and it defaults to 1. On sorted data that is fine. On unsorted data it returns a plausible but wrong position — because with match_type 1 or -1 Excel uses a binary search, which assumes the data is sorted. Run it on the unsorted Sales column and watch: =MATCH(2400, C2:C11) — no third argument — does not return 3. The binary search halves the list, compares the middle, and lands on a position that looks normal but is not the row with 2400. The fix is one character: always pass 0 unless you specifically need a range match. =MATCH(2400, C2:C11, 0) returns 3, every time.

INDEX MATCH — The Combination That Made MATCH Famous

MATCH finds the position; INDEX returns the value at that position. Use the shared product table from the lookup articles — SKU 101 Laptop Stand £45, 102 Standing Desk £399, 103 Office Chair £249, 104 Monitor Arm £89 — in rows 2 to 5, SKU in column A and Price in column D:

FormulaResultWhy
=MATCH(102, A2:A5, 0)2SKU 102 is the second item
=INDEX(D2:D5, 2)399The second price is 399
=INDEX(D2:D5, MATCH(102, A2:A5, 0))399MATCH supplies the 2, INDEX returns the price
=INDEX(B2:B5, MATCH(102, A2:A5, 0))Standing DeskThe same position, the Product column
=INDEX(D2:D5, MATCH(999, A2:A5, 0))#N/A999 is not in the SKU column, so MATCH has no position to give

That is the whole pattern: MATCH answers “which row”, INDEX answers “what is in that row”. Unlike VLOOKUP it works in any direction — the lookup column does not have to be first — and unlike XLOOKUP it works in every version of Excel, including 2019 and earlier.

Two-Way Lookup — INDEX, MATCH and MATCH

One MATCH gives the row; a second MATCH gives the column. Take the rep-by-region sales grid — reps in A2:A5 (Alex, Priya, Jordan, Sam), regions in B1:E1 (East, West, North, South), totals in B2:E5:

FormulaResultWhy
=MATCH("Jordan", A2:A5, 0)3Jordan is the third rep
=MATCH("East", B1:E1, 0)1East is the first region
=INDEX(B2:E5, MATCH("Jordan", A2:A5, 0), MATCH("East", B1:E1, 0))2400Row 3, column 1 — Jordan’s East sales
=INDEX(B2:E5, MATCH("Priya", A2:A5, 0), MATCH("West", B1:E1, 0))850Row 2, column 2 — Priya’s West sales
=INDEX(B2:E5, MATCH("Sam", A2:A5, 0), MATCH("North", B1:E1, 0))450Row 4, column 3 — Sam’s North sales

Change the two input cells and the answer changes — the same formula answers any rep and any region, with no helper column.

Do Two Columns Match? — Yes or No

Two keywords in this group ask for a yes-or-no answer, and MATCH is the test: wrap it in ISNUMBER and the result is a word, not a position.

FormulaResultWhy
=IF(ISNUMBER(MATCH(102, A2:A5, 0)), "Yes", "No")YesSKU 102 is in the list
=IF(ISNUMBER(MATCH(999, A2:A5, 0)), "Yes", "No")NoSKU 999 is not in the list
=IF(ISNUMBER(MATCH(A2, B2:B11, 0)), "Match", "No match")—True when the value in A2 appears anywhere in column B — drag it down to check a whole column

That last row is the two-column check: for each value in one column, MATCH tests whether it appears in the other, and ISNUMBER turns the position or the #N/A into a word. Use it to check a list of SKUs against a master list, or a list of emails against a list of subscribers.

XMATCH — The Modern Replacement

Excel 365 and Excel 2021 add XMATCH, which is MATCH with exact match as the default and a search-from-last option:

FormulaResultWhy
=XMATCH(102, A2:A5)2Exact match by default — no third argument needed
=XMATCH("Alex", A2:A11, 0, -1)10Search from last — Alex’s last occurrence, not his first
=XMATCH(999, C2:C11, 0, 1, "Not found")Not foundThe fifth argument replaces #N/A with a word

Use XMATCH when the workbook will only ever open in Microsoft 365 or Excel 2021 and later. Use MATCH when the workbook must open in Excel 2019 or earlier, or when you need a position rather than a value — and XLOOKUP, which combines INDEX and MATCH into one function with an exact match by default, when you want the value directly and do not need the position at all.

Common Mistakes

MistakeWhat happensFix
You left match_type outDefaults to 1 — on unsorted data, a plausible wrong positionAlways pass 0 unless you need a range match
You searched a two-dimensional range#N/A — MATCH needs one row or one columnSearch one row or one column only
You used match_type 1 on unsorted dataA plausible but wrong positionSort the array ascending, or use 0
You used match_type -1 on ascending dataA plausible but wrong positionSort the array descending, or use 0
You expected the value, not the positionA number like 2 instead of “Priya”Pair it with INDEX, or use XLOOKUP for the value
You expected the last matchMATCH always returns the first matchUse XMATCH with search from last
You compared text with different caseNo problem — text comparison is not case-sensitiveNothing to fix — “east” matches “East”

Frequently Asked Questions

What does the MATCH function return in Excel? A position number, not the value. =MATCH("Priya", A2:A11, 0) returns 2, because Priya is the second item in the range. The number is relative to the range, not to the worksheet.

What is the difference between match type 0, 1 and -1? 0 is exact match — the first cell equal to the lookup value, no sorting needed. 1 is approximate — the largest value less than or equal to the lookup value, array sorted ascending. -1 is approximate — the smallest value greater than or equal to the lookup value, array sorted descending.

Why does my MATCH return #N/A when the value is right there? Either the value is not in the range — check for a trailing space, or a number stored as text — or you searched a two-dimensional range, which MATCH cannot do.

Why does MATCH return the wrong position? You left match_type out, so it defaulted to 1, and the array is not sorted ascending. Pass 0 for an exact match.

How do I use INDEX and MATCH together? =INDEX(D2:D5, MATCH(102, A2:A5, 0)) — MATCH finds the position of SKU 102 (2), and INDEX returns the second price (399).

How do I check if two columns match? =IF(ISNUMBER(MATCH(A2, B2:B11, 0)), "Match", "No match") — true when the value in A2 appears anywhere in column B.

What is XMATCH? MATCH with exact match as the default and a search-from-last option, in Microsoft 365 and Excel 2021 and later. Use it when the workbook will not open in older Excel.

That is the MATCH function in Excel: =MATCH(lookup_value, lookup_array, [match_type]) — the value, one row or one column, and the match type — and it returns a position, not a value, so Priya is 2, 2400 is 3, and Alex is 1 even though he appears three times. On the tables in this guide, that one function answers every question: exact match with 0 gives the first hit, approximate match with 1 gives the band a score falls in — 78 sits in the 70 band, position 3 — and approximate match with -1 gives the mirror image on descending thresholds. Remember the two things that catch everyone once: if you leave match_type out it defaults to 1, and on unsorted data that returns a plausible wrong answer — so always pass 0 unless you need a range match — and MATCH on its own only gives you the position; pair it with INDEX to get the value, which is how the price of SKU 102 comes out as 399. From here, the next functions worth learning are the ones this one sits next to — the XLOOKUP function for the one-function version of the same lookup, the VLOOKUP formula for the older way — and the full learning order for the whole site is on the Excel Formulas hub and the Lookup topic page.


About admin

Author of Excel formula guides on this blog.

View all guides by admin →

Keep Learning

Related guides