Finding the Location of Data with Excel's MATCH Function

Locate the position of a specific value in your data set

Don't get lost in your data, use the Excel MATCH function

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

Instructions in this article apply to Excel 2019, 2016, 2013, 2010, 2007; Excel for Office 365, Excel Online, Excel for Mac, Excel for iPad, Excel for iPhone, and Excel for Android.

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

Use the MATCH Function in Excel

The MATCH example shown in this tutorial uses the function to find the position of the term Gizmos in an inventory list. The function syntax can be entered manually into a cell or with the aide of the Excel's built-in functions, as shown here.

A screenshot showing the MATCH Function Arguments dialog box in Excel

To enter the MATCH function and arguments:

  1. Open a blank Excel worksheet and enter the data in columns C, D, and E shown in the image below. Leave cell D2 blank as that particular cell will host the function.

    A screenshot showing data for the MATCH function in Excel
  2. Select cell D2 to make it the active cell.

  3. Select the Formulas tab of the ribbon menu.

  4. Choose Lookup & Reference to open the function drop-down list.

  5. Select MATCH in the list to open the Function Arguments dialog box. In Excel for Mac, the Formula Builder opens.

  6. Place the cursor in the Lookup_value text box.

  7. Select cell C2 in the worksheet to enter the cell reference.

  8. Place the cursor in the Lookup_array text box.

  9. Highlight cells E2 to E7 in the worksheet to enter the range.

  10. Place the cursor in the Match_type text box.

  11. Enter the number on this line to find an exact match to the data in cell D3.

    A screenshot showing the MATCH Function Arguments dialog box in Excel
  12. Select OK to complete the function. Except in Excel for Mac where you select Done.

  13. The number 5 appears in cell D3 since the term Gizmos is the fifth item from the top in the inventory list.

When you select cell D3, the complete function appears in the formula bar above the worksheet.

=MATCH(C2,E2:E7,0)

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