FormulaCamp
Completed
← All functions
Lookup & reference

MATCH

Position within a range. 0 means exact match.

Syntax

MATCH(lookup_value, lookup_array, [match_type])

Example: =MATCH(A2,B2:B100,0)

Available in: All versions

MATCH returns the position of a value inside a single row or column, not the value itself. Use =MATCH(value, range, 0) for an exact match; it is usually paired with INDEX to build lookups.

When to use it

Arguments explained

Worked examples

Position of a name

A
1Name
2Ana
3Ben
4Chloe
5Dev

Formula: C1: =MATCH("Chloe",A2:A5,0)

Result: 3

Chloe is the third item of A2:A5. The 0 asks for an exact match.

Approximate match for grade bands

AB
1Score fromGrade
20F
360D
470C
580B
690A

Formula: D1: =MATCH(84,A2:A6,1)

Result: 4

With 1, MATCH finds the largest value not above 84 (80), which is item 4. The list must be sorted ascending.

Is the value in the list?

A
1Allowed
2NY
3CA
4TX

Formula: C1: =ISNUMBER(MATCH("CA",A2:A4,0))

Result: TRUE

MATCH returns a number when found and #N/A when not; ISNUMBER turns that into TRUE or FALSE.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =MATCH(103,A2:A6,0)

Example spreadsheet for MATCH
ABCDEF
1IDItemPriceStockResult
2101Pen2.51203
3102Notebook480
4103Lamp2515
5104Mug7.540
6105Backpack3912
Result in F2: 3
Practice this in a lesson: INDEX + MATCH

Common errors and how to fix them

Related functions

Frequently asked questions

What does MATCH return?
The relative position of the first matching item in the range, as a number.
What do 0, 1 and -1 mean in MATCH?
0 is exact match; 1 finds the largest value not above the target in ascending data; -1 finds the smallest value not below the target in descending data.
Does MATCH support wildcards?
Yes, with match type 0 and text: "Sm*" matches "Smith".
Is MATCH case sensitive?
No. "ana" and "ANA" match each other.

Practice

More in Lookup & reference