Position of a name
| A | |
|---|---|
| 1 | Name |
| 2 | Ana |
| 3 | Ben |
| 4 | Chloe |
| 5 | Dev |
Formula: C1: =MATCH("Chloe",A2:A5,0)
Result: 3
Chloe is the third item of A2:A5. The 0 asks for an exact match.
Position within a range. 0 means exact match.
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.
| A | |
|---|---|
| 1 | Name |
| 2 | Ana |
| 3 | Ben |
| 4 | Chloe |
| 5 | Dev |
Formula: C1: =MATCH("Chloe",A2:A5,0)
Result: 3
Chloe is the third item of A2:A5. The 0 asks for an exact match.
| A | B | |
|---|---|---|
| 1 | Score from | Grade |
| 2 | 0 | F |
| 3 | 60 | D |
| 4 | 70 | C |
| 5 | 80 | B |
| 6 | 90 | A |
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.
| A | |
|---|---|
| 1 | Allowed |
| 2 | NY |
| 3 | CA |
| 4 | TX |
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.
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in F2: =MATCH(103,A2:A6,0)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ID | Item | Price | Stock | Result | |
| 2 | 101 | Pen | 2.5 | 120 | 3 | |
| 3 | 102 | Notebook | 4 | 80 | ||
| 4 | 103 | Lamp | 25 | 15 | ||
| 5 | 104 | Mug | 7.5 | 40 | ||
| 6 | 105 | Backpack | 39 | 12 |
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page