Excel MATCH Function: Finding the Location of Data

Locate the position of a lookup value

The Excel MATCH function is used to return a number that indicates the relative position of data in a list, array, or a selected range of cells. It is used when the item's place in the list is needed instead of the item itself.

The specified information can be either text or number data.

The MATCH Function Syntax and Arguments

A function's syntax refers to the layout of the function and includes the function's name, brackets, comma separators, and arguments.

The syntax for the MATCH function is:

= MATCH ( Lookup_value, Lookup_array, Match_type )

Lookup_value (required) is the value that you want to find in the list of data. This argument can be a number, text, logical value, or a cell reference.

Lookup_array (required) is the range of cells being searched.

Match_type (optional) tells Excel how to match the Lookup_value with values in the Lookup_array. The default value for this argument is 1. The choices are -1, 0, or 1.

  • If Match_type = 1 or is omitted, MATCH finds the largest value that is less than or equal to the Lookup_value. The Lookup_array data must be sorted in ascending order.
  • If Match_type = 0, MATCH finds the first value that is exactly equal to the Lookup_value. The Lookup_array data can be sorted in any order.
  • If Match_type = -1, MATCH finds the smallest value that is greater than or equal to the Lookup_value. The Lookup_array data must be sorted in descending order.

Excel MATCH Function

Find the Relative Position of Data in a List with the Match Function
Finding the Relative Position of Data with the Match Function. © Ted French

In the image accompanying this article, the formula containing the MATCH function


returns the relative location of Gizmos as 5, since it is the fifth entry in the range F3 to F8.

If the range C1:C3 contains the numbers 5, 10, and 15, then the formula


returns the number 3, because 15 is the third entry in the range.

Combining MATCH With Other Excel Functions

The MATCH function is usually used in conjunction with other lookup functions such as VLOOKUP or INDEX and is used as input for the other function's arguments, such as:

  • The col_index_num argument for VLOOKUP
  • The row_num argument for the INDEX function.

Example Using Excel's MATCH Function

This example uses the MATCH function to find the position of the term Gizmos in an inventory list.

Options for entering the function and its arguments include:

  • Typing the complete function =MATCH(C2,E2:E7,0) into a worksheet cell
  • Entering the function and arguments using the function's dialog box

Using the MATCH Function Dialog Box

To enter the MATCH function and arguments using the dialog box for the example image:

  1. Click on cell D2, which is the location where the results of the function are displayed.
  2. Click on the Formulas tab of the ribbon menu.
  3. Choose Lookup and Reference from the ribbon to open the function drop-down list.
  4. Click on MATCH in the list to bring up the function's dialog box.
  5. In the dialog box, click on the Lookup_value line.
  6. Click on cell C2 in the worksheet to enter the cell reference into the dialog box.
  7. Click on the Lookup_array line in the dialog box.
  8. Highlight cells E2 to E7 in the worksheet to enter the range in the dialog box.
  9. Click on the Match_type line in the dialog box.
  10. Enter the number on this line to find an exact match to the data in cell D3.
  11. Click OK to complete the function and close the dialog box.
  12. The number 5 appears in cell D3 since the term Gizmos is the fifth item from the top in the inventory list.

When you click on cell D3, the complete function =MATCH(C2,E2:E7,0) appears in the formula bar above the worksheet