Select the product you need help with
How to Use VLOOKUP or HLOOKUP to find an exact matchArticle ID: 181213 - View products that this article applies to. This article was previously published under Q181213 On This PageSUMMARY
The VLOOKUP and HLOOKUP functions contain an argument called range_lookup that allows you to find an exact match to your lookup value without sorting the lookup table. Note It is not necessary to sort the lookup table if you use the range_lookup argument correctly. MORE INFORMATION
The syntax of these functions are defined as follows.
VLOOKUP Function
Argument Definition of argument
---------------------------------------------------------------------
lookup_value The value to be found in the first column of the array.
table_array The table of information in which data is looked up.
col_index The column number in the table_array for which the
matching value should be returned.
range_lookup It is a logical value that specifies whether
you want to find an exact match or an approximate match.
If TRUE or omitted, an approximate match is returned; in
other words, if an exact match is not found, the next
largest value that is less than the lookup_value is
returned. If FALSE, VLOOKUP finds an exact match. If an
exact match is not found, the #N/A error value is returned.
Example That Uses FALSE as the Range_lookup ArgumentThe following list contains some fruits and their respective colors. Notice that the first column is not sorted:A1: Fruit B1: Color A2: Kiwi B2: Green A3: Banana B3: Yellow A4: Grape B4: Purple A5: Apple B5: Red HLOOKUP Function
Argument Definition of argument
---------------------------------------------------------------------
lookup_value The value to be found in the first column of the array.
table_array The table of information in which data is looked up.
row_index The row number in the table_array for which the
matching value should be returned.
range_lookup It is a logical value that specifies whether
you want to find an exact match or an approximate match.
If TRUE or omitted, an approximate match is returned; in
other words, if an exact match is not found, the next
largest value that is less than the lookup_value is
returned. If FALSE, VLOOKUP finds an exact match.
If an exact match is not found, the #N/A error value is
returned.
Example That Uses FALSE as the Range_lookup ArgumentThe following list contains some fruits and their respective colors. Notice that the first column is not sorted:A1: Fruit B1: Color A2: Kiwi B2: Green A3: Banana B3: Yellow A4: Grape B4: Purple A5: Apple B5: Red REFERENCESFor additional information about how to use LOOKUP functions in Microsoft Excel, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
181212
(http://support.microsoft.com/kb/181212/EN-US/
)
XL: Performing a Lookup with Unsorted Data in Excel
214264
(http://support.microsoft.com/kb/214264/EN-US/
)
XL: How to Perform a Case-Sensitive Lookup
214069
(http://support.microsoft.com/kb/214069/EN-US/
)
XL: How to Return the First or Last Match in an Array
181201
(http://support.microsoft.com/kb/181201/EN-US/
)
XL: HLOOKUP, VLOOKUP, LOOKUP Return Incorrect Values
213476
(http://support.microsoft.com/kb/213476/EN-US/
)
XL: Unexpected Results with Mixed Text and Numbers in Lookup Table
280094
For more information about the HLOOKUP function, click Microsoft Excel Help on the
Help menu, type HLOOKUP worksheet function in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
(http://support.microsoft.com/kb/280094/EN-US/
)
XL: Sample User-Defined Function to Hide Formula Errors
For more information about the VLOOKUP function, click Microsoft Excel Help on the Help menu, type VLOOKUP worksheet function in the Office Assistant or the Answer Wizard, and then click Search to view the topic. Properties | Article Translations
|


Back to the top








