
Return the relative position of a value in a row or column. MATCH is useful for INDEX/MATCH formulas, header lookups, and existence checks.
The MATCH function searches for a value in a row or column and returns that value's relative position. If the item is the second entry in the range, MATCH returns 2. If it is the fifth entry, MATCH returns 5.
That makes MATCH useful when you need to know where something is, not just whether it exists. It is often paired with INDEX so one part of the formula finds the position and the other part returns the value from that position.
Returns the position of a value inside a single row or single column.
Returns 1, 2, 3, and so on. In exact-match mode, it returns #N/A if nothing is found.
=MATCH(lookup_value, lookup_array, [match_type])
lookup_value is the item you want to find, lookup_array is the one-dimensional range to search, and match_type controls how the match should work. A common example is =MATCH("Part-A", A1:A100, 0), which asks Excel to find the exact position of "Part-A" in that list.
MATCH works on a single row or a single column, not on a full two-dimensional table by itself. If you need a table lookup, MATCH is usually combined with INDEX, or replaced by a function such as XLOOKUP.
* and ?.0 means exact match, 1 means largest value less than or equal to the lookup value, and -1 means smallest value greater than or equal to the lookup value.The safest choice for most everyday work is 0, because it asks for an exact match. The other two modes are useful, but they depend on sort order. With 1, the list should be sorted ascending. With -1, the list should be sorted descending. If the sort order is wrong, the result may be incorrect even if Excel does not show an error.
MATCH is mainly about returning a position, while some other lookup functions return the final value directly.
| Function | Main Job | Returns | Use When |
|---|---|---|---|
MATCH |
Find a position | Index number | You need the row or column position of a value |
INDEX |
Return a value by position | Cell contents | You already know the row or column number |
XMATCH |
Modern position lookup | Index number | You want more flexible matching and search options |
VLOOKUP |
Return a value from a table | Cell contents | You want a simple vertical lookup and do not need the position itself |
The most common use of MATCH is inside an INDEX/MATCH formula. MATCH finds the position of a label, ID, or header, and INDEX uses that position to return the related value. This is one reason MATCH is so important: it gives other formulas a flexible way to locate the correct row or column.
MATCH is also useful on its own when position matters. You might need to know which item in a ranked list reached a target, which column contains a specific header, or whether an ID exists in a master list. In those cases, the position itself is useful information, even before another function gets involved.
Approximate matching can also be helpful when the list is sorted correctly. For example, a grading table or threshold table may need the position of the nearest allowed value rather than an exact text match. That is where 1 and -1 become useful, but only when the order of the list matches the selected mode.
0 for most exact-match lookups.This formula searches the list and returns the position of "Manager_2". Since it is the second item in the range, MATCH returns 2. That position can then be reused in another formula, especially INDEX.
=MATCH("Manager_2", A1:A3, 0) // Returns 2
Locate the position of "Manager_B" in A1:A3. Formula: =MATCH("Manager_B", A1:A3, 0).
With match_type set to 0, MATCH can use wildcards. The pattern "SKU-202*" means "find text that starts with SKU-202". This is useful when the ending characters may vary but the beginning of the text is stable.
=MATCH("SKU-202*", A1:A3, 0)
Find the position of 100 in B1:B10. Formula: =MATCH(100, B1:B10, 0).
MATCH is often used across a header row to find the column number of a label such as "Price". In this example, the result is 3 because "Price" is the third header in the row. This is a common step in two-way lookups.
=MATCH("Price", A1:D1, 0) // Returns 3
Search for any name starting with "John" in A1:A5. Formula: =MATCH("John*", A1:A5, 0).
MATCH returns a number when the item is found and #N/A when it is not. Wrapping it with ISNUMBER converts that behavior into a simple TRUE/FALSE test, which is a neat way to check whether an ID is present in a list.
=ISNUMBER(MATCH(B5, A1:A3, 0)) // Returns TRUE if found
Find the position of the smallest value greater than or equal to 50 in a descending list. Formula: =MATCH(50, A1:A5, -1).
0 when you need an exact match.1 needs ascending data and -1 needs descending data.* and ?.Tell your friends about this post