MATCH Function

MATCH Function

MATCH Function

Return the relative position of a value in a row or column. MATCH is useful for INDEX/MATCH formulas, header lookups, and existence checks.

ExcelClash Team
PUBLISHED

Summary

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.

Purpose

Find relative position

Returns the position of a value inside a single row or single column.

Return Value

Position number

Returns 1, 2, 3, and so on. In exact-match mode, it returns #N/A if nothing is found.

Syntax

=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.

Arguments

  • lookup_value - The value to search for. In exact-match mode, this can also use wildcards such as * and ?.
  • lookup_array - The row or column where Excel should search.
  • [match_type] - Optional. 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 vs Other Functions

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

Using MATCH

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.

  • Use MATCH when you need a row or column position instead of the final value.
  • Use 0 for most exact-match lookups.
  • Use MATCH with INDEX for flexible lookups that are easier to maintain than hard-coded column numbers.

Example 1 - Find the Position of a Name

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
Check Answer
Challenge #1
Target: Sheet1!F1
Exact Position Find

Locate the position of "Manager_B" in A1:A3. Formula: =MATCH("Manager_B", A1:A3, 0).

Example 2 - Search with a Wildcard

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)
Check Answer
Challenge #2
Target: Sheet1!F2
Top Score Index

Find the position of 100 in B1:B10. Formula: =MATCH(100, B1:B10, 0).

Example 3 - Find the Position of a Header

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
Check Answer
Challenge #3
Target: Sheet1!F3
Wildcard Partial Search

Search for any name starting with "John" in A1:A5. Formula: =MATCH("John*", A1:A5, 0).

Example 4 - Check Whether an Item Exists

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
Check Answer
Challenge #4
Target: Sheet1!F4
Descending Threshold Match

Find the position of the smallest value greater than or equal to 50 in a descending list. Formula: =MATCH(50, A1:A5, -1).

Conclusion Recap

  • Main job: MATCH returns the relative position of a value in a row or column.
  • Safest mode: Use 0 when you need an exact match.
  • Sort matters: 1 needs ascending data and -1 needs descending data.
  • Common pairing: MATCH is often combined with INDEX to build flexible lookups.
  • Extra benefit: In exact-match mode, MATCH can use wildcard patterns such as * and ?.
Tactical Arena
Select Scenario:
Share MATCH Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.