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
Gibt einen Bezug auf eine einzelne Zelle in einem Tabellenblatt als Text zurück
Returns the number of areas in a reference
Gibt einen Bezug zurück, der einen Abstand zu einem angegebenen Bezug hat
Gibt die Anzahl der innerhalb eines Bezugs aufgeführten Bereiche zurück
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
Vrátí funkci ze zadaného odkazu, zformátovanou jako text
Filtruje oblast dat na základě zadaných kritérií
Seřazení obsahu oblasti nebo matice
Seřazení obsahu oblasti nebo matice na základě hodnot v odpovídající oblasti nebo matici
Vrátí seznam jedinečných hodnot v seznamu nebo oblasti
Prohledá oblast nebo matici a vrátí položku odpovídající první nalezené shodě Pokud shoda neexistuje, pak XLOOKUP může vrátit nejpodobnější (přibližnou) shodu
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
Vytvoří zástupce nebo odkaz, který otevře dokument uložený na síťovém serveru, v síti intranet nebo Internet
Uses an index to choose a value from a reference or array
Pomocí rejstříku zvolí hodnotu z odkazu nebo matice
Returns a reference indicated by a text value
Looks up values in a vector or array
Looks up values in a reference or array
Vrátí odkaz určený textovou hodnotou
Vrátí textový odkaz na jednu buňku listu
Returns a reference offset from a given reference
Vrátí počet oblastí v odkazu
Vrátí posun odkazu od zadaného odkazu
Vyhledá hodnoty v odkazu nebo matici
Vrátí číslo řádku odkazu
Vrátí počet řádků v odkazu
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
Načte data v reálném čase z aplikace, která podporuje automatizaci COM
Vrátí počet sloupců v odkazu
Vrátí číslo sloupce odkazu
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
Hledá v prvním sloupci matice a dále ve směru řádku, až vrátí hodnotu buňky
Returns the transpose of an array
Vrátí transponovanou matici
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
Prohledá horní řádek matice a vrátí hodnotu určené buňky
Vyhledá hodnoty ve vektoru nebo matici
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
Vrátí relativní pozici položky v matici nebo oblasti buněk
Vrátí data uložená v sestavě kontingenční tabulky
Zvolí hodnotu ze seznamu hodnot