Open In App

How to Use HLOOKUP in Excel (Formula & Examples)

Last Updated: 03 Feb, 2025

K

Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

Excel HLOOKUP Function – Quick Steps

  • Select the cell
  • Enter the HLOOKUP formula
  • Input arguments>>Press Enter

Excel is packed with features that make handling and analyzing data easier. One of these handy tools is the HLOOKUP function, which is great for finding information in tables that are organized horizontally. The “H” in HLOOKUP stands for “horizontal,” meaning it looks across the top row of a table to find a value, and then retrieves data from a specific row underneath. Whether you’re working with a wide table or need to quickly find data in specific rows, HLOOKUP can help make your tasks faster and more efficient.

In this article, you will learn how to use the HLOOKUP Function in Excel, understand its HLOOKUP syntax, and explore practical HLOOKUP examples in Excel like working with multiple worksheets or even different workbooks.

Try using the new XLOOKUP function, An improved version of HLOOKUP that works in any direction and gives the exact match by default. 

Excel-Template-PhotoPea

Excel HLOOKUP Function with Formula and Examples

What is the HLOOKUP Function in Excel

The HLOOKUP Function in Excel searches for a value in the top row of a table or array and returns a value in the same column from a specified row. Although less popular than its vertical counterpart, VLOOKUP, this function is ideal for data arranged horizontally, where lookup values are stored in the first row.

When to Use the HLOOKUP Function in Excel

The HLOOKUP Function is most useful when:

  • Your data is organized horizontally.
  • You need to retrieve information from a specific row based on a lookup value.
  • You require exact or approximate matches in your lookup operation.

HLOOKUP Syntax & Parameters

The syntax of the HLOOKUP function is as follows:

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

Where:

  • lookup_value: The value you want to search for in the top row of the table.
  • table_array: The range of cells that contains the data. The top row of this range will be searched for the lookup_value.
  • row_index_num: The row number in the table_array from which to return a value. The top row is row 1.
  • [range_lookup]: An optional argument. Use TRUE for an approximate match (default), or FALSE for an exact match.

How to Use HLOOKUP Formula in Excel

The HLOOKUP formula is a useful tool for looking up data in tables arranged horizontally. This HLOOKUP tutorial will guide you through the steps to use the function effectively:

Step 1: Prepare your Data

Organize your data so that the lookup value resides in the first row of a range or table. For Example:

How to Use HLOOKUP in Excel

Prepare your Data

Step 2: Choose a Cell to Enter the Formula

Select a blank cell where you want the result of the HLOOKUP function to appear. In the below example we have selected B5.

How to Use HLOOKUP in Excel

Select a Cell where you want to display the results

Step 3: Enter the HLOOKUP Formula

To look up the sales for Q3, enter the following formula in your selected cell:

=HLOOKUP("Q3", A1:E2, 2, FALSE)

Step 4: Press Enter

After pressing Enter, Excel will return 2500, which is the value in the second row under “Q3.”

How to Use HLOOKUP in Excel

Select the Cell>> Enter the Formula>> Press Enter

Excel HLOOKUP Function with Formula Examples

The HLOOKUP function is a powerful tool in Excel that helps you find data arranged horizontally in a table. In this section, you’ll explore HLOOKUP examples in Excel that demonstrate how to use the function for quick and efficient data retrieval.

Example 1: Finding an Exact Match

Suppose you have a grade table where the first row contains scores and the second row contains grades.

How to Use HLOOKUP in Excel

Prepare your Data

To find the grade for a score of 80, use the formula:

=HLOOKUP(80, A1:F2, 2, FALSE)

Result: Excel will return B.

How to Use HLOOKUP in Excel

Excel will return B.

Example 2: Approximate Match in HLOOKUP

For approximate matches, set the range_lookup argument to TRUE.

How to Use HLOOKUP in Excel

Approximate Match

To find the tax rate for an income of 45000, use the formula:

=HLOOKUP(45000, A1:E2, 2, TRUE)

Result: Excel will return 20, as 45000 is between 40000 and 60000.

How to Use HLOOKUP in Excel

Enter the data >> Use the Formula

Example 3: Using Wildcards with HLOOKUP

Using Asterisk (*) for Partial Matches. You want to find the quantity of any category that starts with “F” (e.g., “Fruits”).

How to Use HLOOKUP in Excel

HLOOKUP With Wildcards

Formula:

=HLOOKUP("F*",A1:D2,2,FALSE)

Result: 50 (The quantity for “Fruits”).

How to Use HLOOKUP in Excel

Use the Formula

How to Use HLOOKUP Across Two Worksheet

Using the HLOOKUP formula across two worksheets in Excel is a great way to retrieve data from one sheet while working on another. This can be especially helpful when managing large datasets spread over multiple sheets.

Let’s Suppose you have two worksheets: Sheet1 and Sheet2. To extract our matching data from another worksheet, mention the sheet name followed by an exclamation mark. 

Step 1: Identify the Lookup Value

In Sheet1, locate the cell containing the lookup value (e.g., B1) that you want to search for in Sheet2.

How to Use HLOOKUP in Excel

Identify the Lookup Value

Step 2: Specify the Data Range in the Other Sheet

  • Reference Sheet2 in your formula by including the sheet name followed by an exclamation mark (!).
  • Example data range in Sheet2: A1:F2.

Step 3: Write the HLOOKUP Formula

  • In Sheet1, input the following formula to perform the lookup
=HLOOKUP(B1, Sheet2!A1:F2, 2, FALSE)
  • B1: The lookup value in Sheet1.
  • Sheet2!A1:F2: The data range in Sheet2 containing the lookup table.
  • 2: Specifies the row number in the lookup table from which to retrieve the result.
  • FALSE: Ensures an exact match.

Step 4: Drag the Formula

Drag the formula down or across other cells in Sheet1 to copy the HLOOKUP formula, dynamically referencing the lookup values.

How to Use HLOOKUP in Excel

Drag the Formula

Data from sheet 2 (sold) is copied from sheet 2 to sheet 1. 

How to Use HLOOKUP with Another Workbook

The HLOOKUP function in Excel becomes even more powerful when you use it to retrieve data across multiple workbooks. This can help you manage large datasets stored in different files without the need to combine them manually.

Suppose you have two workbooks: Workbook1.xlsx and Workbook2.xlsx. You want to retrieve data from Book2.xlsx into Book1.xlsx.

Step 1: Open Both Workbooks

Ensure both workbooks are open in Excel.

How to Use HLOOKUP in Excel

Enter data in two different workbooks

Step 2: Reference the External Workbook

In Book1.xlsx, write the formula referencing Book2.xlsx. The external workbook name should be enclosed in square brackets ([]) and followed by the sheet name and range.

Step 3: Write the HLOOKUP Formula in Book1.

For example, to retrieve data from Sheet1 of Book2.xlsx, use the following formula:

=HLOOKUP(A2, [Workbook2.xlsx]Sheet1!A1:F2, 2, FALSE)
How to Use HLOOKUP in Excel

Enter the Formula in Book1

Step 4: Save the Formula

If the external workbook is closed, the file path will be automatically included in the formula.

For Example:

=HLOOKUP(A2, 'C:\Documents\[Workbook2.xlsx]Sheet1'!A1:F2, 2, FALSE)

Step 5: Copy the Formula

Copy or drag the formula to other cells as needed to reference corresponding lookup values.

How to Use HLOOKUP in Excel

Copy down the Formula

This setup shows how HLOOKUP works between two workbooks, retrieving data dynamically from the Sales row in Book2.xlsx into Book1.xlsx.

Things to Keep in Mind When Using HLOOKUP

  • The lookup_value must always be in the top row of the table_array.
  • The table_array should contain multiple rows and columns for HLOOKUP to work.
  • HLOOKUP is case-insensitive, so “jane” and “Jane” will be treated as the same.
  • If HLOOKUP cannot find the lookup_value, it will return an #N/A error.
  • For approximate matches, the table_array should be sorted in ascending order.

Difference Between VLOOKUP and HLOOKUP

VLOOKUP and HLOOKUP are both lookup functions in Excel, but they work differently based on how your data is organized.

Feature VLOOKUP HLOOKUP
Orientation Searches data vertically (in columns). Searches data horizontally (in rows).
Search Direction Finds a value in the first column and retrieves from a specified row. Finds a value in the first row and retrieves from a specified column.
Best Use Use when data is organized in columns. Use when data is organized in rows.

Limitations of HLOOKUP

  • HLOOKUP can only search for the lookup_value in the top row and return values from rows below it. If your data is not organized this way, you may need to rearrange your data or use other functions like INDEX and MATCH.
  • Unlike VLOOKUP, you cannot look to the left of the lookup_value; it can only return values from rows below the lookup_value row.

Conclusion

The HLOOKUP function is a valuable tool in Excel when you need to search for data across horizontal rows. Whether you’re working with monthly sales data, grades, or employee information, HLOOKUP makes it easier to retrieve specific values based on a reference from the top row.

By understanding the HLOOKUP formula, applying the correct row_index_num, and deciding between exact and approximate matches, you can efficiently perform horizontal lookups to analyze your data and make informed decisions.

How to use HLOOKUP in Excel – FAQs

What if the HLOOKUP can’t find the Lookup value?

 If HLOOKUP can’t find the lookup value and range_lookup is TRUE, it will consider the largest value that is less than lookup_value.

What if the LOOKUP value is smaller than the smallest value in the first row of the table array?

If the LOOKUP value is smaller than smallest value in the first row of the table_array, HLOOKUP returns the error value.

What is the difference between VLOOKUP and HLOOKUP?

Both of the function search for lookup value. The difference is that how it is being used. 

Firstly the name itself is different, V in VLOOKUP is stands for Vertical search that is in a column or to the left of the data that you want to find.

And the H in HLOOKUP function stands for horizontal search, It searches the value at the top most row of the table and returns a value located at the specified number of rows down in the same column.

What does this formula mean by “HLOOKUP(10,{1,2,3:”a”,”b”,c”,”d”},2, true)?

This formula indicates that Lookup the value 10 in the three row array constant and return the value form row 2 in the third column. There are three rows of values in the array constant separated by a semicolon (;) because “c” is found in the row 2 and in the same column as 3, “c” is returned.



K

News
Improve
Discuss
Do you want to advertise with us?Click here to know more

How to Use HLOOKUP in Excel (Formula & Examples)

article_img
Excel HLOOKUP Function - Quick StepsSelect the cell Enter the HLOOKUP formulaInput arguments>>Press Enter Excel is packed with features that make handling and analyzing data easier. One of these handy tools is the HLOOKUP function, which is great for finding information in tables that are organized horizontally. The "H" in HLOOKUP stands for "horizontal," meaning it looks across the top row of a table to find a value, and then retrieves data from a specific row underneath. Whether you're working with a wide table or need to quickly find data in specific rows, HLOOKUP can help make your tasks faster and more efficient.In this article, you will learn how to use the HLOOKUP Function in Excel, understand its HLOOKUP syntax, and explore practical HLOOKUP examples in Excel like working with multiple worksheets or even different workbooks.Try using the new XLOOKUP function, An improved version of HLOOKUP that works in any direction and gives the exact match by default. Excel HLOOKUP Function with Formula and ExamplesTable of ContentWhat is the HLOOKUP Function in ExcelHow to Use HLOOKUP Formula in ExcelExcel HLOOKUP Function with Formula ExamplesHow to Use HLOOKUP Across Two Workshe
Read More

How to use HLOOKUP in Google Sheets - Guide

article_img
The HLOOKUP function in Google Sheets is a valuable tool for performing horizontal lookups in your data tables. Unlike VLOOKUP, which searches vertically, HLOOKUP searches across rows to find a specific value and returns corresponding data from another row. Whether you're managing data in horizontally structured tables or need to find information based on criteria across rows, HLOOKUP simplifies the process.This guide will explain how the HLOOKUP function works, its syntax, and how it compares to VLOOKUP. You'll also learn step-by-step instructions for using HLOOKUP in Google Sheets to efficiently locate data and make your workflows smoother.HLOOKUP Function in Google Sheets for Horizontal LookupsThe HLOOKUP function in Google Sheets searches for a value in the first row of a range and returns a value from a specified row below it. It’s ideal for horizontally organized data, making it easy to retrieve information from rows based on a key value in the top row.How It WorksSearch Key: Identify the value you want to search for in the first row.Range: Define the table or range where the search will take place.Row Index: Specify the row number within the range from which the value should
Read More

Excel SUMIF Function: Formula, How to Use and Examples

article_img
The SUMIF function in Excel is a versatile tool that enables you to sum values based on specific criteria, such as a true or false condition. This feature makes it perfect for conditional summation tasks like totaling sales over a particular amount, adding up expenses in specific categories, or summing scores above a threshold. Whether you're working with Excel formula SUMIF for single criteria or expanding to SUMIFS with multiple criteria, this Excel tutorial will show you how to efficiently filter and sum data.In this article, we’ll explain SUMIF function in Excel and demonstrate how to use SUMIF with multiple criteria, along with Excel SUMIF examples that showcase its flexibility.SUMIF Function in Excel with ExamplesTable of ContentWhat is the SUMIF Function in ExcelHow to Use SUMIF Function in Excel How to Use Excel SUMIF with DatesExample of SUMIF FunctionHow to Use SUMIFS with Multiple Criteria in SpreadsheetWhat is the SUMIF Function in ExcelThe SUMIF function in Excel allows you to sum data within a specified range based on a single condition, making it an essential part of Excel formulas for tasks like filtering totals by category, date, or other attributes. Whether you ne
Read More

How to use IRR Function in Excel: Formula + Examples

article_img
How to Calculate Internal Rate of Return in Excel: Quick StepsEnter Your Cash FlowsEnter IRR Formula >> Press Enter Preview ResultsEver wondered how businesses decide which projects are worth investing in? The Internal Rate of Return (IRR) is a key financial metric that helps evaluate the profitability of investments. But calculating it manually can be tricky—thankfully, Excel’s IRR function makes it easy. Whether you’re analyzing uneven cash flows, comparing multiple projects, or just learning about financial metrics, this guide will show you how to calculate IRR in Excel step by step.In this article, we’ll break down the Excel IRR formula with examples, explain the difference between IRR vs. NPV, and even cover advanced calculations like XIRR and MIRR. By the end, you’ll know how to use the IRR function like a pro and make smarter investment decisions.How to Calculate IRR FunctionTable of ContentWhat Is Internal Rate of Return (IRR)Formula for Calculating Internal Rate of Return (IRR) in ExcelHow to Calculate IRR in Microsoft Excel: Step by Step GuideHow to use XIRR Function in Excel (IRR for Irregular Cash Flows)How to use MIRR Function in Excel (Modified Internal Rate of
Read More

Difference Between Array Formula and Regular Excel Formula

article_img
An array formula performs multiple calculations and processes multiple values at once, the array formula performs operations depending on the condition we have used with the array formula. Whereas the Regular excel formula performs operations on an individual value. Before understanding the difference between the two, let's first understand the definitions of each formula in detail. Regular Excel Formula In order to apply the regular excel formula, we require a dataset. For example, if we have 10 different numbers and we are asked to find out the top 3 smallest numbers. If we will use the regular excel formula, =SMALL(A2:A11, 3) we will get only the 3rd smallest value. Note that, we will not get all 3 smallest values instead we will get only the 3rd smallest value from our data source. Array Formula Using the array formula, we can easily find the top 3 smallest values from our data source in a single step. For this Select 3 Cells > Add Following Array Formula =SMALL(A2:A11,{1;2;3}) > Ctrl + Shift + Enter. As we click Ctrl + Shift + Enter, Excel will convert our formula into an array formula. And, find the top 3 smallest values from our data source. What is Array Formula?
Read More

How to Decide Which Excel Lookup Formula to Use?

article_img
In Excel, you have a ton of methods to look upon the specific types of values, but the optimal method chosen is what creates a difference. So, what mindset we need to use specific lookup methods in a situation? That's what we will look at here. But, first, let's take a look at an example from real life why is it necessary to choose the most optimal approach for lookups. Example: Suppose you work at a firm, where lots of revenue sheets(or receipts), and regular employee update sheets come in regularly, but the availability of computers in that region is almost NULL.So, you will use your senses to compute these sheets. Now, you have many approaches, either to read the total of revenues in every sheet column by column, or row by row, or computing small numbers first, and then add or subtract(according to a sheet) big numbers from them, use calculators to compute the sheets, and the ways will be getting more broad, and more in numbers. Now, if you try to compute regular employee sheets, which contain the regular performance of employees along with the daily wage they got, and whether someone left the firm or not. Here also many approaches are possible, as they contain names, numbers, p
Read More

Excel Date Functions with Formula Examples

article_img
There are many functions in Microsoft Excel that may be used to work with dates and timings in Excel. Each function completes a straightforward task, but by combining numerous functions into a single formula, you may handle trickier and more complicated problems. The purpose of discussing DATE functions in Excel is to help different people perform more complex and challenging tasks by combining several functions within one formula. The DATE function is used to calculate dates in Excel. To work with these formulas you first need to insert the dates in Excel. Excel provides different functions to work with dates & times such as TODAY, NOW, WEEKDAY, EOMONTH, etc. which we will discuss here with examples. Excel DATE function ListDATE Function Get the Current date and TimeTODAY- It returns today's date.NOW- It returns the current date and time.Converts Dates to / From textDATEVALUE- Helps to Convert date in the text format to date format TEXT- It helps to convert a date to a text value.Retrieve dates in ExcelDAY- It returns the day of the monthMONTH- It is used to return the month of a specified dateYEAR- It is used to return the year of a specified dateEOMONTH- It returns the last
Read More

How to use Copilot in Excel with Examples (Step-by-Step Guide)

article_img
As of 2024, Microsoft introduced a new feature called Copilot for Excel, part of the broader Microsoft 365 suite, designed to enhance productivity and streamline data manipulation using AI-powered tools. The introduction of Excel Copilot is transforming how professionals across industries manage and interpret their data. This AI-driven tool enhances productivity, automates repetitive tasks, and simplifies complex data analysis. In this detailed guide, we'll explore how to effectively use Copilot in Excel, complete with practical examples to illustrate its capabilities.How to use Copilot in Excel with ExamplesTable of ContentWhat is Copilot in Excel?How to Access Copilot in ExcelExcel Copilot Advantages in ExcelHow to Use Copilot in Excel (November 2024)Different Ways to use Copilot in Excel (Including Copilot Prompt)What is Copilot in Excel?Microsoft Excel Copilot is an innovative, AI-powered feature designed to enhance productivity and streamline data processing tasks within Excel. As a part of the Microsoft 365 suite, Excel Copilot transforms how users interact with data by offering advanced artificial intelligence capabilities that simplify complex operations, automate repetitiv
Read More

How to Use Goal Seek in Excel with Examples: A Complete Guide

article_img
Excel Function Goal Seek : Quick StepsSet Up Your DataGo to Data Tab>>Select What-if-AnalysisFill Out the Goal Seek Dialog BoxRun Goal Seek>>Review the ResultsDo you find yourself stuck trying to solve “what-if” scenarios in Excel? Whether it’s calculating loan payments, determining sales targets, or figuring out break-even points, Goal Seek in Excel is the ultimate problem-solving tool. By allowing you to identify the exact input needed to achieve a specific result, Goal Seek makes complex calculations straightforward and hassle-free.This guide will show you how to use Goal Seek in Excel, complete with Excel Goal Seek examples that highlight its practical applications in real-world situations. From financial planning to data analysis, understanding this feature can transform how you handle spreadsheets and decision-making.How to use Goal Seek in ExcelWhat is Goal Seek in ExcelGoal Seek feature in Excel helps you find the input value needed to achieve a specific result in a formula. For example, if you know the desired outcome but are unsure of the input required, Goal Seek will adjust the input automatically to give you the correct result.Use in Microsoft ExcelTo calcu
Read More

How To Use MATCH Function in Excel (With Examples)

article_img
Finding the right data in large spreadsheets can often feel like searching for a needle in a haystack. This is where the MATCH function in Excel proves invaluable. The MATCH function helps you locate the position of a specific value within a row or column, making it a cornerstone of efficient data management and analysis.In this guide, we’ll explore how to use MATCH in Excel, discuss its syntax, and walk through MATCH Excel examples that showcase its practical applications. Whether you're working on a project that involves dynamic lookups or need to pair it with other Excel lookup functions, the MATCH function simplifies complex tasks and empowers you to handle data more effectively.MATCH Function in ExcelWhat is the MATCH Function in ExcelThe MATCH function returns the position of a value in a row, column, or table, rather than the actual value itself. For Example, if you’re looking for the number "50" in a list of numbers and it’s the 5th item, the function will return the number 5.Syntax of the MATCH Function=MATCH(lookup_value, lookup_array, [match_type]) Here, the [match_type] value denotes whether the user wants an exact match or an approximate match. Arguments:lookup_value:
Read More
three90RightbarBannerImg