How to Use the HLOOKUP Function in Excel

Today, let’s delve into the functionality of a potent tool available in both Microsoft Excel and Google Sheets: the HLOOKUP function. HLOOKUP stands for “Horizontal Lookup” and is specifically crafted to search for a value in the first row of a table or an array, and then return a matching value from the same column out of a row you specify. This function proves invaluable when you need to rapidly retrieve data from horizontal rows or across multiple rows in a table.

Basic Syntax and Arguments

The syntax for the HLOOKUP function is:

=HLOOKUP(lookup_value, table_array, row_index_number, [range_lookup])
  • lookup_value: The value you’re searching for in the first row of the table.
  • table_array: The range of cells containing the data under consideration. It’s important that the first row of this range includes the values to be compared with lookup_value.
  • row_index_number: Indicates the row number from which the value should be returned. The numbering starts at 1 for the first row, then 2 for the second, and so on.
  • range_lookup: [Optional] A boolean that decides whether to find an exact match (FALSE) or an approximate match (if TRUE, or omitted).

Examples and Use Cases

Example 1: Basic HLOOKUP

Consider the following table in Excel:

Apples Oranges Bananas
5 8 3

To determine the number of oranges, utilize the HLOOKUP function as shown:

=HLOOKUP("Oranges", A1:C2, 2, FALSE)

This formula will output the value 8, indicating there are 8 oranges.

Example 2: Using HLOOKUP with Dynamic Data

Imagine a table that lists sales data over different months:

Jan Feb Mar
Product A 100 150 200
Product B 75 100 125

To retrieve the February sales figure for Product B, apply the HLOOKUP function with cell references like so:

=HLOOKUP("Feb", B1:D3, MATCH("Product B", A1:A3, 0), FALSE)

This formula will return the figure 100, representing February sales for Product B.

These scenarios exemplify a fraction of the potential applications of the HLOOKUP function to effectively access data from tables in Excel and Google Sheets. With a grasp of the basic syntax and some practice with diverse use cases, you can fully harness the capabilities of this flexible function to enhance your spreadsheet operations.

More information: https://support.microsoft.com/en-us/office/hlookup-function-a3034eec-b719-4ba3-bb65-e1ad662ed95f

Other functions
Returns a reference as text to a single cell in a worksheet
Returns the number of areas in a reference
Chooses a value from a list of values
Returns the column number of a reference
Returns the number of columns in a reference
Filters a range of data based on criteria you define
Returns the formula at the given reference as text
Returns data stored in a PivotTable report
Creates a shortcut or jump that opens a document stored on a network server, an intranet, or the Internet
Uses an index to choose a value from a reference or array
Returns a reference indicated by a text value
Looks up values in a vector or array
Looks up values in a reference or array
Returns a reference offset from a given reference
Returns the row number of a reference
Returns the number of rows in a reference
Retrieves real-time data from a program that supports COM automation
Sorts the contents of a range or array
Sorts the contents of a range or array based on the values in a corresponding range or array
Returns the transpose of an array
Returns a list of unique values in a list or range
Looks in the first column of an array and moves across the row to return the value of a cell
Searches a range or an array, and returns an item corresponding to the first match it finds If a match doesn't exist, then XLOOKUP can return the closest (approximate) match
Returns the relative position of an item in an array or range of cells