1. Home
  2. Functions
  3. Lookup and reference
  4. HLOOKUP

HLOOKUP function

Looks for a value in the first row of a table and returns the value in the same column from another row.

Syntax

=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

Arguments

ArgumentRequiredDescription
lookup_valueRequiredThe value to look for
table_arrayRequiredThe table; the first row is searched
row_index_numRequiredWhich row to return, from 1
range_lookupOptionalTRUE (default) for the closest match in a sorted row, FALSE for an exact match

How to use HLOOKUP

HLOOKUP takes 3 required arguments and 1 optional argument. Type =HLOOKUP( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=HLOOKUP("b", {"a","b","c";1,2,3}, 2, FALSE)Result 2
=HLOOKUP(25, {10,20,30;"x","y","z"}, 2, TRUE)Result "y"

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.