HLOOKUP Function in Google Sheets
Searches the first row of a range and returns a value from the same column in a specified row. The horizontal sibling of VLOOKUP — rarely needed in modern sheets but still in use.
Syntax
HLOOKUP(search_key, range, index, [is_sorted])Returns: Value at the matched column, in the specified row.
Excel equivalent: HLOOKUP (identical)
Parameters
| Name | Required | Description |
|---|---|---|
| search_key | Required | Value to look for in the first row of range. |
| range | Required | The range to consider. First row is searched. |
| index | Required | Row number (1-based) to return the value from. |
| is_sorted | Optional | TRUE = approximate match (default), FALSE = exact match. |
Examples
Look up by column header
=HLOOKUP("Q3", A1:E10, 5, FALSE)Finds "Q3" in row 1, returns the value 4 rows below it.
When to use an alternative
- XLOOKUP — Modern replacement — works horizontally or vertically with a cleaner signature.
- INDEX + MATCH — You need more flexibility than HLOOKUP's row-index approach.
- Restructure the data — Vertical data is the norm in most spreadsheets — flipping to vertical often makes everything else easier too.
Common errors and how to fix them
#N/A
Cause: Same as VLOOKUP — search_key not found or whitespace issue.
Fix: Add FALSE for exact match, wrap with IFERROR for fallback.
Related functions
Frequently Asked Questions
When would I use HLOOKUP instead of VLOOKUP?
When your data is organized with headers as the first row and values flowing down columns — i.e., column-oriented data. In practice, most sheets are row-oriented and HLOOKUP is rarely needed. If your sheet has consistent HLOOKUP usage, consider TRANSPOSE to flip it to row-oriented and use the more powerful tools available.
Is XLOOKUP a replacement for HLOOKUP?
Yes. XLOOKUP works in either direction depending on the orientation of lookup_range and result_range. For new formulas, XLOOKUP is strictly better than HLOOKUP.