The information in this article applies to:
SUMMARY
In Microsoft Excel, the VLOOKUP function searches the leftmost column of an
array for a particular value and returns the corresponding value from a
cell in another column, indicated by the col_index_num.
MORE INFORMATIONUsing INDEX and MATCHThe following formula return the same information that a VLOOKUP returns without requiring the first column of the table to be sorted
If none of the cells in Lookup_Array match Lookup_Value, this formula will return #N/A. Using OFFSET and MATCHThe OFFSET function can be used if you are unsure of the entire address of "table_array" because it uses the MATCH function to locate the position of "lookup_value" within "lookup_array." In the following function, the "offset_col" argument uses the upper left most cell of the table as "top_cell" and returns the desired value as determined by the MATCH (offset row) and offset column:
Example
Because the "Name" range is not sorted, using VLOOKUP to find the age of Mary returns 28, the age of Henry. To find the age of Mary, use the following:
The function returns 22. NOTE: In Microsoft Excel 5.0, the first column of a lookup table does not have to be sorted to use the VLOOKUP and HLOOKUP functions if you are looking for an exact match. To look for an exact match, specify the fourth argument of VLOOKUP or HLOOKUP as FALSE. If you omit the fourth argument, or specify the argument as TRUE, you must sort the first column of the table. The OFFSET function described above also works in Microsoft Excel versions 5.0, but is not necessary. For additional information about using the VLOOKUP function to find an exact match in Microsoft Excel version 5.0, please see the following article in the Microsoft Knowledge Base: Q108639 : XL: Range_Lookup Argument in VLOOKUP Finds Exact Match REFERENCES
"Function Reference," version 4.0, pages 267-268, 299-300
Additional query words: 2.00 2.01 2.10 2.20 2.21 3.00 4.00 hlookup exact
Keywords : kbhowto xlformulas |
Last Reviewed: March 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |