HLOOKUP
The HLOOKUP function in Google Sheets is a horizontal lookup tool that searches across the first row of a range for a key and returns the value of a specified cell in the column found. This function is useful for finding matching data in a table based on a specific criteria.
Function Syntax and Parameters
Syntax: HLOOKUP(search_key, range, index, [is_sorted])
Parameters:
search_key: The value to search for in the first row of the range.range: The range of cells to search for the search_key.index: The column index (starting from 1) in the range from which to return a value.[is_sorted]: [Optional] Indicates whether the first row is sorted in ascending order. Set toTRUEorFALSEbased on the sorting.
Step-by-Step Tutorial
- Basic usage of
HLOOKUP:- Example:
=HLOOKUP("Apples", A1:E4, 2, FALSE) - Result: Returns the value from the second row where "Apples" is found in the first row.
- Example:
Use Cases and Scenarios
- Data Lookup: Fetch information from a table by matching criteria across the first row.
- Inventory Management: Retrieve product details using unique identifiers like SKU or item code.
- Pricing Tables: Look up prices based on specific conditions or product names.