Use INDEX and MATCH in Excel

The INDEX and MATCH functions can be used to lookup and retrieve data from any column of an Excel table. These functions are seen as an alternative to VLOOKUP function, which is limited by always looking in the first column of a table.

Using the INDEX and MATCH functions is more flexible and more dynamic than VLOOKUP. For example, inserting columns into an Excel Table would result in the VLOOKUP functions returning the wrong data.

However, the INDEX and MATCH functions would not be harmed by this, and would function as normal.

Let’s have a look at each function independently first, and then we shall see the magic when they are put together.

The INDEX function returns an item from a specific position in a list.

The syntax for the INDEX function is;

=INDEX(array, row_num, [col_num])

Array: The list that you want to search within

Row_num: The row number containing the data you want to return

Col_num: The column number containing the data you want to return. Col_num is optional

For example, the INDEX function below returns the value in the 6th row and 3rd column.

Using the INDEX function
Using the INDEX function

MATCH Function

The MATCH function returns the position of a value in a list.

=MATCH(lookup_value, lookup_array, [match_type])

Lookup_value: The value you are looking for in the list

Lookup_array: The list that you are searching

Match_type: How to match the lookup value. It can be -1, 0 or 1.

  • 1 – Finds the largest value less than or equal to the lookup value. The list should be sorted in ascending order for this match type
  • 0 – Finds the first value that is equal to the lookup value. The list can be in any order for this match type
  • -1 – Finds the smallest value greater than or equal to the lookup value. The list should be sorted in descending order for this match type

For example, the MATCH function below returns the position of Tye Training in the list.

Using the MATCH function
Using the MATCH function

Using INDEX and MATCH to Lookup Data

Let’s look at using INDEX and MATCH together to return the name of the company for a specific outstanding amount. The example below actually returns the name of the company with the highest outstanding amount, as the MAX function has been used in cell G3.

Notice that the function searches for a value in the 3rd column and returns a value from the 1st column. This is something that the VLOOKUP function cannot perform, due to its limitation of always looking in the first column.

Using the INDEX and MATCH functions to lookup data
Using the INDEX and MATCH functions to lookup data

More by this Author


No comments yet.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working