Codementor Events

Index and Match Function in Excel

Published Jan 12, 2022
Index and Match Function in Excel

Excel's index and match functions are similar to VLOOKUP,HLOOKUP Function but they don't have the limitations that HLOOKUP and VLOOKUP have.

INDEX Function

INDEX Function in Excel returns a value at a specific position.

Syntax:

=index(array,row_num,[column_num])
  • array: The range or table in which lookup value is present.
  • row_num:The row number in which lookup lookup value is present.
  • column_num: Optionally, you can specify the column number in which lookup value is present.

For example, in below table if you want to lookup the value at row number 3 and column number 2, we will do it as:-
Screenshot (75).png

Now let us look at another example where we want to find value at row number 2 , column number 4, we will do it as:-
Screenshot (86).png

MATCH Function

MATCH Function is kind of opposite to INDEX Function.
MATCH Function returns numeric position of a given value.

Syntax:-

=MATCH(lookup_value,lookup_array,[match_type])
  • lookup_value: The value which you want to lookup.
  • lookup_array: The range or array in which lookup value is present.
  • match_type: Optionally,you can specify 0 for Exact match and 1 for Exact or next greater or -1 for Exact or next smaller.

For example, if you want to find out the position of Age 23 you can do it as :
Screenshot (80).png

Result is as follows:
Screenshot (81).png

Now, let us look at one another example where i want to find position of Name Ellen, we can do it as :
Screenshot (87).png

Result is as follows:
Screenshot (88).png

INDEX and MATCH Function Combined:

Remember,Vlookup has one limitation that lookup value must always be present in the first column in range or array, but we can override this limitation with INDEX and MATCH function together.
Now, What if I want to lookup DEPT by NAME, we can do it as:-
Screenshot (84).png

Result is as follows:-
Screenshot (85).png

Discover and read more posts from anshika vohra
get started
post commentsBe the first to share your opinion
Show more replies