Index and Match
Index and Match
ADARSH TIWARI
GROUP 6
what is Index ?
In Excel, the INDEX function is used to return the value of a cell in a specified
row and column of a given range. It allows you to retrieve data from a specific
location within an array or a range of cells. The INDEX function has multiple
variations, but the most common syntax is as follows:
array: This is the range of cells or array from which you want to retrieve data.
row_num: This is the row number in the array from which you want to retrieve
data.
Suppose you have a table of data in cells A1:B5, and you want to retrieve the value in the
second row and the first column. You can use the INDEX function like this:
excel
=INDEX(A1:B5, 2, 1)
What is Match Function in Excel?
THE MATCH FUNCTION IN EXCEL IS USED TO SEARCH FOR A SPECIFIED VALUE
IN A RANGE AND THEN RETURN THE RELATIVE POSITION (INDEX) OF THAT
ITEM. IT'S COMMONLY USED IN COMBINATION WITH OTHER FUNCTIONS, SUCH
AS INDEX, TO PERFORM MORE ADVANCED LOOKUPS.
HERE IS THE SYNTAX OF THE MATCH FUNCTION:THE MATCH FUNCTION IN
EXCEL IS USED TO SEARCH FOR A SPECIFIED VALUE IN A RANGE AND THEN
RETURN THE RELATIVE POSITION (INDEX) OF THAT ITEM. IT'S COMMONLY
USED IN COMBINATION WITH OTHER FUNCTIONS, SUCH AS INDEX, TO
PERFORM MORE ADVANCED LOOKUPS.
lookup_array: This is the range of cells that contains possible matches for the
lookup_value.
1 (or omitted): Finds the largest value less than or equal to the lookup_value.
0: Finds an exact match. The lookup_array must be sorted in ascending order
for this option to work correctly.
-1: Finds the smallest value greater than or equal to the lookup_value. The
lookup_array must be sorted in descending order for this option to work
correctly.
The MATCH function returns the relative position of the lookup_value within
the lookup_array. If the value is not found, the function returns an error.
Here's a simple example:
Suppose you have a list of numbers in cells A1:A5, and you want to find the position of
the number 10 in the list. You can use the MATCH function as follows:
excel
Copy code
=MATCH(10, A1:A5, 0)
If 10 is present in the list, this formula will return the relative position of 10 in the range
A1:A5. If 10 is not found, the function will return an error or a #N/A error.
The MATCH function is often combined with the INDEX function for more advanced
lookups, especially when you need to retrieve a value based on the position returned by
MATCH.
INDEX AND MATCH
In Excel, INDEX and MATCH are two functions that are often used together to perform more
advanced lookups and searches than what can be achieved with VLOOKUP or HLOOKUP alone.
Limitations of Vlookup:
1. Left-to-Right Lookup:
VLOOKUP can only perform left-to-right lookups. If your lookup value is in a column to the
right of the return column,
VLOOKUP won't work. INDEX and MATCH can be used in any order,
allowing for both left-to-right and right-to-left lookups.
assnment 1: vlookup
name basic slno
deepak 3000 10
=IFERROR(INDEX($A$2:$F$20,MATCH($B25,$B$2:$
B$20,0),MATCH(C$24,$A$2:$F$2,0)),0)