INDEX MATCH vs VLOOKUP Function (9 Practical Examples)

Here’s an overview of using the INDEX-MATCH and the VLOOKUP functions in a dataset.

overview of index match vs vlookup function


INDEX-MATCH vs. VLOOKUP Function in Excel: 9 Examples

To show the differences between the INDEX-MATCH formula and the VLOOKUP function, we are using two tables here.
One is the Student records of a college.

Dataset containing students' name, marks and grade

Another table contains different Item records of a company.

dataset containing items, year, selling location and sales of a company


Example 1 – Number of Functions

We will look up the Marks of a Student Sara by using both the INDEX-MATCH function and the VLOOKUP function.

marks of the student named Sara is needed

INDEX-MATCH Function:

=INDEX($C$5:$C$10,MATCH(B13,$B$5:$B$10,0))

So, here we can see this formula consists of two functions one is the INDEX function and the other is the MATCH function. Inside the MATCH function here B13 is the lookup value, $B$5:$B$10 is the lookup array and 0 is for an exact match. Finally, MATCH will return the row or column index number of the lookup value in the data range.

MATCH will return here 4.

Then, it will pass this information to the INDEX function which returns the information we actually want by using the return range $C$5:$C$10.

using index and match function for finding out sara's marks

VLOOKUP Function:

=VLOOKUP(B13,$B$5:$D$10,2, FALSE)

This formula consists of only one function which is the VLOOKUP function.

Here, B13 is the lookup value, $B$5:$D$10 is the table array, 2 is the column index number and FALSE is for an exact match.

using vlookup function to find out sara's marks

Quick Note:
Considering the above two formulas, we can say that it is easier to use the VLOOKUP function than the INDEX-MATCH function.

Read More: How to Use VLOOKUP Function with Exact Match in Excel


Example 2 – Different Reference Systems

We used the following table to look up the Marks for the Student Sara.

marks of the student named Sara is needed

INDEX-MATCH Function:

=INDEX(C5:C10,MATCH($B13,$B$5:$B$10,0))

Here, the return range C5:C10 within the INDEX function uses dynamic references so it can change with the change of the data range and give us the right output.

different reference system with index and match function

VLOOKUP Function:

=VLOOKUP(B13,$B$5:$D$10,2, FALSE)

Here, 2 is the column index number which is the static reference in the VLOOKUP function so it cannot give us the correct value with the change of the dataset.

different reference system with vlookup function

Quick Note:
Considering the above two formulas, we can say that it is more advantageous to use the INDEX-MATCH function than the VLOOKUP function due to the dynamic referencing.


Example 3 – Inserting a New Column

We will demonstrate the changes in results after inserting a new column named Subject before the column Marks.

marks of the student named Sara is needed

INDEX-MATCH Function:

=INDEX(C5:C10,MATCH($B13,$B$5:$B$10,0))

index and match function to find out sara's marks

This formula is giving us the right output due to the dynamic references inside the INDEX function. It automatically changes the return range here from C5:C10 to D5:D10.

=INDEX(D5:D10,MATCH($B13,$B$5:$B$10,0))

inserting a new column

VLOOKUP Function:

=VLOOKUP(B13,$B$5:$D$10,2, FALSE)

INDEX MATCH vs VLOOKUP

The static reference 2 doesn’t change and here the Subject column has the column index number 2.

=VLOOKUP(B13,$B$5:$E$10,2,FALSE)

inserting a new column with vlookup

Quick Note:
Considering the above two formulas, we can say that it is more convenient to use the INDEX-MATCH function than the VLOOKUP function due to the advantages of having the correct output in spite of inserting a new column.


Example 4 – Deleting a Column

We will show the changes of results after deleting a column named Subject.

INDEX MATCH vs VLOOKUP

INDEX-MATCH Function:

=INDEX(D5:D10,MATCH($B13,$B$5:$B$10,0))

deleting a column using index & match function

We deleted the column Subject.
This formula is giving us the right output due to the dynamic references inside the INDEX function. It automatically changes the return range here from D5:D10 to C5:C10.

=INDEX(C5:C10,MATCH($B13,$B$5:$B$10,0))

INDEX MATCH vs VLOOKUP

VLOOKUP Function:

=VLOOKUP(B13,$B$5:$E$10,3, FALSE)

deleting a column

After deleting the column Subject, we are getting B instead of 80. This change occurs because static reference 3 doesn’t change and here the Grade column has the column index number 3 now.

=VLOOKUP(B13,$B$5:$D$10,3, FALSE)

column deleted using vlookup

Quick Note:
Considering the above two cases, we can say that it is more convenient to use the INDEX-MATCH function than the VLOOKUP function due to the advantages of having the correct output in spite of deleting a column.


Example 5 – Direction of Columns in Range

We will show the difference in the direction of columns.

INDEX MATCH vs VLOOKUP

INDEX-MATCH Function:

=INDEX(E5:E7,MATCH($B10,$B$5:$B$7,0))

The position of the lookup range $B$5:$B$7 is before the return range E5:E7.

direction of columns

=INDEX(B5:B7,MATCH($B10,$D$5:$D$7,0))

The lookup range $D$5:$D$7 is after the return range B5:B7.

direction of columns for index function

VLOOKUP Function:

=VLOOKUP(B10,B5:E7,4,FALSE)

The position of the lookup value is in the range B5:E7 and the column index number is 4 which is after the lookup range.

INDEX MATCH vs VLOOKUP

=VLOOKUP(B10,B5:E7,1,FALSE)

Going from the right side to the left side or having a lookup value after the return range will give us an error in this case.

direction of columns for vlookup

Quick Note:
It is more convenient to use the INDEX-MATCH function than the VLOOKUP function due to the advantages of having the correct output regardless of the direction of the lookup range and return range.


Example 6 – Functional Differences

The INDEX-MATCH function can give an output for multiple conditions whereas the VLOOKUP function can give multiple values for a lookup value.

dataset containing items, year, selling location and sales of a company

INDEX-MATCH Function:

=INDEX(E5:E7,MATCH(1,(B10=B5:B7)*(C10=C5:C7)*(D10=D5:D7),0))

B10, C10, and D10 are the lookup values that will be looked up in B5:B7, C5:C7, and D5:D7 ranges respectively and 0 is for an exact match.

MATCH will return here the row-index number 3.
Then the INDEX function will return the corresponding value.

functional differences of index & match function vs vlookup

VLOOKUP Function:

=VLOOKUP(B10,B5:E7,{2,3,4},FALSE)

B10 is the lookup value, B5:E7 is the table array, {2,3,4} is the array of the column index number and FALSE is for the Exact match.

functional differences

Quick Note:
The two functions can provide different results and have varied use cases.


Example 7 – Looking up the Value in Row or Column or Both

The INDEX-MATCH function can look for the value in both the row-wise and column-wise direction but the VLOOKUP function can look for the value only in the column-wise direction.

dataset for looking up differences between index vs vlookup function

looking through the columns

INDEX-MATCH Function:

 =INDEX(C6:E8, MATCH(H7,B6:B8,0), MATCH(H5&H6,C4:E4&C5:E5,0))

MATCH(H7, B6:B8,0) is used for row-wise matching, and MATCH(H5&H6, C4:E4&C5:E5,0) is used for column-wise matching.

looking up the value in row, column or both

VLOOKUP Function:

=VLOOKUP(B10,B5:E7,4,FALSE)

This will only look for the value in the column-wise direction.

vlookup formula for looking up for sales of Banana

Quick Note:
It is more convenient to use the INDEX-MATCH function than the VLOOKUP function due to the advantages of looking up the value in both the row-wise and column-wise direction rather than only the column-wise direction.


Example 8 – Adaptability of the Formula

You can easily copy or drag the formula to get the correct result in the case of the INDEX-MATCH function, but the VLOOKUP function will not give the correct result.

dataset for testing adaptibility of the functions

INDEX-MATCH Function:

=INDEX(C5:C7,MATCH($B10,$B$5:$B$7,0))

We drag the formula to the right side.

adaptability of the index function formula

You will get the correct output East for the lookup value Banana.

=INDEX(D5:D7,MATCH($B10,$B$5:$B$7,0))

Due to the dynamic references inside the INDEX function, it automatically changes the return range here from C5:C7 to D5:D7.

adaptability of the vlookup formula

VLOOKUP Function:

We have got the Year 2019 by using the following formula

=VLOOKUP($B10,$B$5:$E$7,2,FALSE)

We dragged the formula to the right.

adaptability of the vlookup formula

We are not getting the correct value here.

=VLOOKUP($B10,$B$5:$E$7,2,FALSE)

The formula doesn’t change here due to the static referencing, so it gives the same value as the previous one.

INDEX MATCH vs VLOOKUP

Quick Note:
Considering the above two formulas, we can say that it is more convenient to use the INDEX-MATCH function than the VLOOKUP function due to the advantages of having the correct output in spite of dragging or copying the formula.


Example 9 – Errors in Formulas

In the case of the INDEX-MATCH function, you can get two errors, #REF! and #N/A, but for the VLOOKUP function only gets the #N/A error.

dataset for testing error in index & vlookup formula

INDEX-MATCH Function:

We have mistaken the range within the MATCH function and within the INDEX function.

=INDEX(E5:E6,MATCH(B10,B5:B7,0))

The selected range E5:E6 is less than the range B5:B7.

error for index function

For this blunder in range selection, we are getting the #REF! error here.

#REF error for Index function

If you try to look for a value that is not in the range, you will get the #N/A error.

=INDEX(E5:E7,MATCH(B10,B5:B7,0))

Blueberry is not in the range.

error for index & match function

This will give us the #N/A error.

N/A error for Index function

VLOOKUP Function:

For looking up a value that is not in the range, you will get the #N/A error.

=VLOOKUP(B10,B5:E7,4,FALSE)

Blueberry is not in the range.

error in VLOOKUP function

This will give us the #N/A error.

N/A error for Vlookup

Things to Remember:

  • For a look-up value exceeding 255 characters, VLOOKUP will produce an error, but the INDEX-MATCH function can work properly.
  • For a large dataset, the INDEX-MATCH function is way faster than the VLOOKUP function.
  • For returning multiple values, INDEX-MATCH function is better than the VLOOKUP function.

Read More: Use VLOOKUP to Sum Multiple Rows in Excel


Practice Section

We have provided a Practice section like below in a sheet named Practice.

practice and understand INDEX vs VLOOKUP formula in excel


Download the Practice Workbook


Related Articles


<< Go Back to Excel VLOOKUP Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjima Hossain
Tanjima Hossain

TANJIMA HOSSAIN is a marine engineer who enjoys working with Excel and VBA programming. For her, programming is a handy, time-saving tool for managing data, files, and online tasks. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. She holds a B.Sc. in Naval Architecture & Marine Engineering from BUET and is now a content developer. In this role, she creates tech-focused content centred around Excel and VBA. Apart from... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo