logo-mini

MATCH Function

The MATCH function in Excel is a powerful tool that allows users to search for and locate specific data within a range of cells. It is a useful function for organizing and manipulating large amounts of data, and it can save time and effort by eliminating the need to manually search through large sets of data.

The syntax for the MATCH function is as follows:

=MATCH(lookup_value, lookup_array, [match_type])

The lookup_value is the value that you want to search for within the lookup_array. The lookup_array is the range of cells that you want to search for the lookup_value. The optional match_type parameter allows you to specify how the function should perform the search.

There are three different match types that you can use with the MATCH function:

  1. Exact match (0) – This option tells the function to search for an exact match of the lookup_value within the lookup_array. If an exact match is not found, the function will return an error.
  2. Next smaller value (-1) – This option tells the function to search for the next smallest value that is less than the lookup_value within the lookup_array. If no value is found, the function will return an error.
  3. Next larger value (1) – This option tells the function to search for the next largest value that is greater than the lookup_value within the lookup_array. If no value is found, the function will return an error.

By default, the MATCH function uses the exact match option if the match_type parameter is not specified.

One common use of the MATCH function is to look up a specific value in a table and return the corresponding value from a different column in the same row. For example, suppose you have a table with a list of employees and their corresponding salary data. You can use the MATCH function to search for a specific employee’s name and return their salary.

To do this, you would first create a formula that includes the MATCH function. The lookup_value would be the employee’s name, and the lookup_array would be the range of cells containing the employee names. The match_type parameter can be left blank since you want to search for an exact match.

Next, you would use the INDEX function to return the corresponding salary data for the employee. The INDEX function allows you to specify a range of cells and a row and column number, and it returns the value of the cell at the intersection of the specified row and column.

To use the INDEX function in conjunction with the MATCH function, you would specify the range of cells containing the salary data as the first parameter, and the row number returned by the MATCH function as the second parameter. The column number is optional and can be left blank if you want to return data from the first column.

Here is an example of a formula that uses the MATCH and INDEX functions to look up an employee’s salary data:

=INDEX(A2:B10, MATCH(“John Smith”, A2:A10, 0), 2)

This formula searches for the name “John Smith” in the range A2:A10 and returns the corresponding salary data from column B in the same row.

Another common use of the MATCH function is to find the position of a value within a range of cells. For example, suppose you have a list of values in a column and you want to know what position a specific value occupies in the list. You can use the MATCH function to search for the value and return its position.

Download the sample files: MATCH FUNCTION – Click here