Skip to main content
SheetCraft
🔍 Lookup Function · intermediate

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

NameRequiredDescription
search_keyRequiredValue to look for in the first row of range.
rangeRequiredThe range to consider. First row is searched.
indexRequiredRow number (1-based) to return the value from.
is_sortedOptionalTRUE = 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

  • XLOOKUPModern replacement — works horizontally or vertically with a cleaner signature.
  • INDEX + MATCHYou need more flexibility than HLOOKUP's row-index approach.
  • Restructure the dataVertical 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.

Source: Google Sheets official function reference.