XL: How to Return the First or Last Match in an Array (214069)
The information in this article applies to:
- Microsoft Excel 2000
- Microsoft Excel 2002
- Microsoft Excel 97 for Windows
This article was previously published under Q214069 For a Microsoft Excel 98 version of this article, see 191112.
SUMMARY
You can use the LOOKUP() function to search for a value within an array of sorted data and return the corresponding value contained in that position within another array. If the lookup value is repeated within the array, it returns the last match
encountered. This behavior is true for the VLOOKUP(), HLOOKUP(), and
LOOKUP() functions.
To find the first value instead of the last value in an array, use the INDEX() and MATCH() functions.
Modification Type: | Major | Last Reviewed: | 8/8/2006 |
---|
Keywords: | kbhowto KB214069 |
---|
|