HLOOKUP

Formulas / HLOOKUP
Find values in a horizontal table.
=HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
  • lookup_value - required, the value to lookup
  • table_array - required, the range with the lookup table
  • row_index - required
  • range_lookup - [OPTIONAL] a Boolean indicating exact match or approximate match, defaults to approximate match

Examples

  • =HLOOKUP(C5,table,2,1)

    The HLOOKUP function is used to search for a specific value in the first row of a table. The example searches the table for the value in C5 and returns the value in the same column of the second row. The fourth argument, 1, indicates that the search is exact.

  • =HLOOKUP(C5,table,2,1)

    Let's say the cell C5 contains the value "Apple". In this case, the HLOOKUP function searches the table for the word "Apple" in the first row. The function then returns the value in the same column of the second row.

  • =HLOOKUP(C5,table,2,0)

    The HLOOKUP function can also be used to search for a value in the first column of a table. The example searches for the value in C5 in the first column of the table, and returns the value in the same row of the second column. The fourth argument, 0, indicates that the search is approximate.

  • =HLOOKUP(C5,table,2,0)

    Let's say the cell C5 contains the value "Orange". In this case, the HLOOKUP function searches the table for the word "Orange" in the first column. The function then returns the value in the same row of the second column.


Summary

The HLOOKUP function is used to search for a value in a table array and return a value from a different row in the same column. It is a useful tool for quickly finding data in large datasets.

  • The HLOOKUP function can find a value in a table that is horizontally sorted. The "H" in HLOOKUP stands for "horizontal" and the lookup values must be in the first column of the table.
  • The HLOOKUP function supports approximate and exact matching, as well as wildcards in matching. The range_lookup argument of HLOOKUP can be set to TRUE for an approximate match or FALSE for an exact match.

Frequently Asked Questions

What is the HLOOKUP function?
The HLOOKUP function searches for a value in a table or an array and returns a value in the same row or column as the specified value in the table or array. The H in HLOOKUP stands for "horizontal lookup."
What arguments are required for the HLOOKUP function?
The following arguments are required:
  • lookup_value: The value to find in the first row of the table
  • table_array: A table of information, either a reference to a range or a named range.
  • row_index_num: The row number in the table_array to return. Must be 1 to return the first row value in table_array.
Is the range_lookup argument required for the HLOOKUP function?
No, the range_lookup argument is an optional argument. This argument is a logical value that tells HLOOKUP whether to find an exact match or an approximate match.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV