Excel Lookup Function
I want to share you about Excel Lookup Function: VLOOKUP, HLOOKUP, & XLOOKUP
VLOOKUP
VLOOKUP is used to look up data for a VERTICAL data source
For example:
You have a report (Data A) and a source data (Data B). You want to use VLOOKUP to retrieve Total Sales (pcs) from Data B and display it in Data A.
=VLOOKUP(lookup_value;table_array;col_index_num;[range_lookup])- lookup_value: The key value used to find the corresponding data. It should be available in both the report and the source data.
- table_array: The source data range, starting from the lookup key column and extending to the column containing the data you want to retrieve.
- col_index_num: The column number in the table_array that contains the data you want to retrieve.
- range_lookup: Use FALSE or 0 (null) for exact match
In this case:
- Lookup_value: ID Employee (both available in Report (A) & Source (B)
- Table_array: Range from cell K4 to M11 (The $ symbol for locks the cell or range reference so that it does not change when the formula is copied.)
- col_index_num: 3 (In Source (B) ID Employee [col 1], Name Employee [col 2], Total Sales [col 3])
- 0 for exact match
To copy the VLOOKUP formula, you can either double-click the fill handle in the bottom-right corner of the cell or drag the fill handle down to the last row.
HLOOKUP
HLOOKUP is used to look up data for a HORIZONTAL data source
Get Nisrina Shofi’s stories in your inbox
Join Medium for free to get updates from this writer.
For example:
You have a report (Data A) and a source data (Data B). You want to use HLOOKUP to retrieve Target Sales (pcs) from Data B and display it in Data A.
=HLOOKUP(lookup_value;table_array;row_index_num;[range_lookup])- lookup_value: The key value used to find the corresponding data. It should be available in both the report and the source data.
- table_array: The source data range, starting from the lookup key column and extending to the column containing the data you want to retrieve.
- row_index_num: The row number in the table_array that contains the data you want to retrieve.
- range_lookup: Use FALSE or 0 (null) for exact match
In this case:
- Lookup_value: Sales Area (both available in Report (A) & Source (B)
- Table_array: Range from cell I3 to Q4 (The $ symbol for locks the cell or range reference so that it does not change when the formula is copied.)
- row_index_num: 2 (In Source (B) ID Sales Area [row 1], Target Sales [Row 2])
- 0 for exact match
To copy the VLOOKUP formula, you can either double-click the fill handle in the bottom-right corner of the cell or drag the fill handle down to the last row.
XLOOKUP
XLOOKUP is used to look up data for a vertical data source.
=XLOOKUP(lookup_value;lookup_array;return_array;[if_not_found];[match_mode];[search_mode])lookup_value= The key value used to find the corresponding data. It should be available in both the report and the source data.
lookup_array= The range in source data that contains the lookup_value
return_array= The range in source data that contains value you want to return in the report
if_not_find= OPTIONAL, what to display if the value isn’t found
match_mode= OPTIONAL, determines how Excel matches the value
search_mode= OPTIONAL, determines the search direction
lookup_value= Sales Area (both available in Report (A) & Source (B)
lookup_array= Range Sales Area in Source Data B from contains cell J4 to J8 (The $ symbol for locks the cell or range reference so that it does not change when the formula is copied.)
return_array= Range Transport Allowance in Source Data B contains cell K4 to K8 (The $ symbol for locks the cell or range reference so that it does not change when the formula is copied.)
if_not_find= the value to return if the lookup value is not find. In this case, enter 0
match_mode= enter 0 for exact match
search_mode= determines the search direction, you can leave it blank
To copy the XLOOKUP formula, you can either double-click the fill handle in the bottom-right corner of the cell or drag the fill handle down to the last row.
Thank you for reading ❤









