SheetsLessons
Lesson 17 · Lookups

HLOOKUP Function

Practice HLOOKUP in Google Sheets: look up values in tables where the categories run across the top row.

Task 1 of 2

Using HLOOKUP, return March costs from the monthly report. Answer in I2.

I2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

VLOOKUP turned on its side

=HLOOKUP(search_key, range, index, [is_sorted])

HLOOKUP searches the first row of a range and returns a value from further down the same column. Use it when your headings run left to right, as in monthly reports where each month is a column.

index counts rows, starting at 1 for the header row of your range. Just like VLOOKUP, is_sorted defaults to TRUE, so add FALSE for an exact match.

XLOOKUP handles horizontal data too (give it a row as the lookup range) and avoids the row-number counting.