The Excel INDEX function can return an item from a specific position in a list.
The Excel MATCH function can return the position of a value in a list.
The INDEX / MATCH functions can be used together, as a flexible and powerful tool for extracting data from a table.
The Excel INDEX function has three arguments:
1. array: Where is the list? If you use an absolute reference ($A$2:$B$4), instead of a relative reference (A2:B4), it will be easier to copy to formula to other cells. Or, name the lookup table, and refer to it by name.
2. row_num: Which row has the value you want returned? In this example, the item in the third row will be returned.
3. [column_num]: Which column has the value you want returned? In this example, the item in the second column will be returned
The Excel MATCH function has three arguments:
1. lookup_value: What value do you want to find in the list? You can type the value, or refer to a cell that contains the value.
2. lookup_array: Where is the list?
3. [match_type]: Match_type can be -1, 0, or 1. It tells Excel how to match the lookup_value to values in the lookup_array.
1 -- find the largest value less than or equal to lookup_value
(the list must be in ascending order)
0 -- find the first value exactly equal to lookup_value. Lookup_array
(the list can be in any order)
-1 -- find the smallest value greater than or equal to lookup_value.
(the list must be in descending order)
Note: If match type is omitted, it is assumed to be 1.
Wednesday, April 28, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment