How to Use Lookup Functions in Excel : Hlookup, Vlookup, Xlookup

James Olayinka

By James Olayinka

Jun 22

Microsoft Excel, a widely used spreadsheet application, provides powerful functions to manipulate and analyze data efficiently. Among the essential functions for data lookup and retrieval function which are HLOOKUP, VLOOKUP, and XLOOKUP.

These functions offer different ways to search for specific values within a table and retrieve corresponding information. Whether you need to search horizontally or vertically, Excel's lookup functions can assist you in finding the data you need.

In this article, I will explore HLOOKUP, VLOOKUP, and XLOOKUP in detail, providing explanations of their syntax and usage and present practical examples to demonstrate how to use these functions using the table below.

By understanding and utilizing these lookup functions, you can enhance your Excel skills and efficiently work with data in various business, financial, or analytical tasks.

HLOOKUP:

The HLOOKUP function in Excel stands for "Horizontal Lookup." It allows you to search for a value in the topmost row of a table and retrieve a corresponding value from a specified row below it. The syntax for the HLOOKUP function is as follows:

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

  • lookup_value is the value you want to search for.
  • table_array is the range of cells that contains both the lookup value and the result.
  • row_index_num specifies which row within the table_array to retrieve the result from.
  • range_lookup (optional) is a logical value that indicates whether you want an exact match or an approximate match.

Example: Suppose I want to retrieve the sales amount for Product B in Quarter 3. I can use the HLOOKUP function as follows:

Formular to use:

=HLOOKUP("Quarter 3", A1:E4, 3, FALSE)

Implementation in Excel:

VLOOKUP:

The VLOOKUP function in Excel stands for "Vertical Lookup." It works similarly to HLOOKUP but searches for a value in the leftmost column of a table and retrieves a corresponding value from a specified column to its right. The syntax for the VLOOKUP function is as follows:

=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

  • lookup_value is the value you want to search for.
  • table_array is the range of cells that contains both the lookup value and the result.
  • col_index_num specifies which column within the table_array to retrieve the result from.
  • range_lookup (optional) is a logical value that indicates whether you want an exact match or an approximate match.

Example: Suppose I want to retrieve the sales amount for Product C in Quarter 2. I can use the VLOOKUP function as follows:

Formular to use:

=VLOOKUP("Product C", A2:E4, 3, FALSE)

Implementation in Excel:

XLOOKUP:

The XLOOKUP function is a more recent addition to Excel and is considered a replacement for both HLOOKUP and VLOOKUP. It provides more flexibility and can perform both horizontal and vertical lookups. Additionally, XLOOKUP allows you to perform approximate matches, exact matches, and wildcard matches.

The syntax for the XLOOKUP function is as follows:

=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])

  • lookup_value is the value you want to search for.
  • lookup_array is the range of cells or an array that contains the lookup values.
  • return_array is the range of cells or an array that contains the corresponding results.
  • if_not_found (optional) specifies the value to return if no match is found.
  • match_mode (optional) determines the match type (exact match, approximate match, or wildcard match).
  • search_mode (optional) determines whether to search from the first to last match or from the last to first match.

Example: Suppose, I want to retrieve the sales amount for Product A in Quarter 4. I can use the XLOOKUP function as follows:

Formular to use:

=XLOOKUP("Product A", $A$2:$A$4, E2:E4)

Implementation in Excel:

Conclusion

HLOOKUP, VLOOKUP, and XLOOKUP are powerful functions in Microsoft Excel that enable users to search for specific values within a table and retrieve corresponding information. These functions provide flexibility in performing both horizontal and vertical lookups, allowing users to extract data efficiently. HLOOKUP is ideal for searching across rows, VLOOKUP is suitable for searching down columns, while XLOOKUP offers a more versatile approach with additional matching options. By mastering these lookup functions, Excel users can streamline their data analysis processes, making it easier to find and retrieve relevant information from large datasets.

If you want to explore more on building your Microsoft Excel skill, visit our learning path HERE

Also, if you want to get started with data analytics and want to improve your skills, you can check out our bootcamp!

Table of contents
  1. HLOOKUP:
  2. VLOOKUP:
  3. XLOOKUP:
  4. Conclusion
resa logo

Empowering individuals and businesses with the tools to harness data, drive innovation, and achieve excellence in a digital world.

2025Resagratia (a brand of Resa Data Solutions Ltd). All Rights Reserved.