HLOOKUP Function

This article explains how to use the HLOOKUP function

HLOOKUP is a function that looks up a value in a datasheet that is organized horizontally. HLOOKUP supports approximate and exact matching. Lookup values must appear in the first row of the datasheet passed into HLOOKUP.


HLOOKUP (value, datasheet, row_index, [range_lookup])
  • value
    • The value to look for in the first row of a datasheet.
  • datasheet
    • The table from which to retrieve a value.
  • row_index
    • The row in the datasheet from which to retrieve a value.
  • range_lookup
    • [optional] 0 = exact match (default). 1 = approximate match.
  • range_lookup_higher_bound
    • [optional] 0 = return lower value (default). 1 = return higher value

Sample Usage

Lookup the exact value of Question A in row 1 of Datasheet A and retrieve the value from the 2nd row (row numbering starts at 0 - zero):



Lookup the value 180 in row 1 of Datasheet B and retrieve the value from the 3rd row:

HLOOKUP(180, DB, 2, 2)

Example calculator


  • Instead of a table range in a spreadsheet program (e.g., A1:B22), the value of the datasheet needs to be just the reference to that datasheet (e.g., formulascript>DA).
  • Instead of working with the native datasheet for tables, you can also work with data from a Google Sheet. See this article to learn more.
  • Row numbering in a datasheet starts at 0. So if you need to retrieve a value in the 3rd row of your datasheet, you should reference this row in your formula with a 2.

Related articles

Learn more about hlookup in one of the following articles