Lookupmedium
MATCH()
Returns the relative position of a value in a range.
Syntax
fx
=MATCH(search_key, range, [search_type])
Try it
F2
→
5
Sample data · sales.csv
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Company | Region | Quarter | Revenue |
| 2 | Acme Co | West | Q1 | 18,400 |
| 3 | Acme Co | West | Q2 | 22,100 |
| 4 | Acme Co | West | Q3 | 31,700 |
| 5 | Acme Co | West | Q4 | 48,200 |
| 6 | Globex | East | Q1 | 14,200 |
| 7 | Globex | East | Q2 | 19,800 |
| 8 | Globex | East | Q3 | 23,400 |
Common pitfalls
- The third arg
search_typedefaults to1(less-than approximate). Pass0for exact match: almost always what you want. - Returns the position within the range, not the value. Wrap with
INDEXto actually retrieve the value. - Returns
#N/Aif not found. Combine withIFERRORfor a clean fallback.
Related formulas
Used by