Inside The Web
    Facebook Twitter Instagram
    Inside The Web
    • Office
      • Excel
      • Ms Word
      • OneDrive
      • Google Docs
      • Google Sheets
      • Google Drive
    • Email
      • Gmail
      • Outlook
      • Emal Etiquette
    • Office Etiquette
    • Productivity
    Inside The Web
    Home»Office»Excel»How to Use HLOOKUP in Excel

    How to Use HLOOKUP in Excel

    Asmi DhakalBy Asmi DhakalJuly 6, 2023 Excel 5 Mins Read

    HLOOKUP is a powerful lookup function in Excel that retrieves values from different rows in the same column. HLOOKUP is mainly used during data analysis in Excel worksheets. 

    HLOOKUP is similar to VLOOKUP. The only difference between them is that HLOOKUP looks up values horizontally, while VLOOKUP retrieves values from different columns in the same row. However, the arguments used in both of these functions are quite similar.

    What is HLOOKUP?

    HLOOKUP basically means horizontal lookup. In larger data sets, you can use this function to check the values that are in different rows of the same column. HLOOKUP works by moving horizontally to look for the set reference. Then, it moves down the row according to the row number you’ve set in the arguments. 

    You can use the HLOOKUP function in all versions of Excel.

    Arguments Used in HLOOKUP

    HLOOKUP takes in four arguments as its arguments. Among these, three are required while one is optional. Here is how you need to arrange the arguments while constructing a formula using the HLOOKUP function:

    =HLOOKUP(lookup_value,table_array,row_index_number,[range_lookup])
    ArgumentData TypeDescription
    lookup_valueINTEGERThe reference value. Remember to only reference a cell from the first row
    table_arrayRANGEThe table with your data
    row_index_numberINTEGERThe row your value is in
    [range_lookup]BOOLEANEnter TRUE (1)  for an approximate match and FALSE (0)  for an exact match.

    Application of the HLOOKUP Function

    You can use HLOOKUP in different ways to extract different values. Similarly, you can also use tools like Data Validation to make HLOOKUP dynamic. In this section, we will be looking into diverse ways you can use HLOOKUP in your worksheet.

    Example 1: Use HLOOKUP to Return an Exact Match

    In this example, I will show you how you can use HLOOKUP to return the exact. You can use this method when you’re sure about the data you’re entering in the “lookup_value” section. If your lookup value has any time of typo, HLOOKUP will return the #N/A error.

    Let’s use the HLOOKUP function to return the marks obtained by Frank in Physics in this mark sheet. As we know for sure that the header we’re going to reference is Physics, we can pass this lookup_value as the exact match.

    Here’s how we have constructed the formula using the HLOOKUP function to return us the marks scored by Frank in Physics:

    =HLOOKUP(“Physics”,A1:F11,6,0)
    HLOOKUP Exact Match
    Quick Fact: TRUE is denoted by 1 while FALSE is denoted by 0 in Excel.

    Example 2: Use HLOOKUP to Return an Approximate Match

    Sometimes, the exact value you’re looking to get the result for does not really exist in the table. This is mostly true for tables with numerical values. In cases like these, you can use HLOOKUP to approximately match your value. You can do this by entering “FALSE” or “0” in the range_lookup section.

    HLOOKUP will look for the value that is smaller than the look_up value that you’ve provided. If the lookup_value is smaller than the smallest value in the table_array, HLOOKUP will return the #N/A! error.

    In this table, we have a lab report of 5 different chemicals. Each column represents the temperature each chemical was put under and if they were reactive or not. For instance, chemical B was not reactive between 0.20-0.29 but was reactive at 0.30-0.39 unit temperature.

    To see if Chemical A is reactive at temperature 0.54, we will be using the HLOOKUP function in the following format:

    =HLOOKUP(A9,A1:J5,2,1)
    Use HLOOKUP for Approximate Match

    I entered two other conditions and used the HLOOKUP function to generate the results.

    Example 3: Using Wildcards in HLOOKUP

    There are certain times when you might not be sure about the lookup_value. While you can always do an approximate matching in HLOOKUP, you can also use wildcards. You can use wildcards, including asterisk (*), question mark (?), and tilde (~) to create the lookup_value. You will have to do an exact match when using wildcards.

    Wildcard NameSymbolDescription
    Asterisk*You can use Asterisk to look up all values that start or end with the entered letter.
    Question Mark?You can use the Question Mark symbol as a placeholder symbol for missing texts.
    Tilde~You can use Tilde when you don’t want asterisks and question marks to act as wildcards.

    Here is a data table. Imagine this table has more columns; possibly hundreds. Now, while analyzing the data, your co-worker told you they’re not sure if they’ve entered “Amount” or “Total Amount”. You obviously cannot use exact matching in this case, but, you also cannot use approximate matching as it will end you up with the #N/A error.

    Let’s use wildcards to resolve this issue. Here’s how we constructed the HLOOKUP formula using the asterisk (*) wildcard:

    =HLOOKUP("*"&A13,A1:F11,6,FALSE)
    Using Wildcards in HLOOKUP

    Use Data Validation to Make HLOOKUP Dynamic

    Let’s go back to example 1. Let’s assume we now want to see the marks scored by Frank in History. You will have to manually change the lookup_value from “Physics” to “History”. While you could do it once or twice, it can get tedious after some time.

    Let’s save you the hassle, shall we? Instead of hardcoding our value, let’s use cell referencing. Now, every time you change the data in the cell, your lookup_value changes. To make this process feel even more automated, let’s create a drop-down list using data validation to switch between our data.

    1. Head to the Data tab from the menu bar.
    2. From the Data Tools section, select Data Validation.
      Data Validation Tool
    3. In the Settings tab, select the fly-out under Allow > List.
      Data Validation Options
    4. Collapse the window under Source and select the range B1:F1.
      Data Validation Source
    5. Click OK.

    Now, every time you need to switch your lookup_value, you can click on the fly-out menu next to the cell and select your data.

    Data Validation Drop Down List
    Excel Functions
    Asmi Dhakal

      Asmi is a content writer specializing in MS Office. She loves writing Excel-related content to assist other users to learn their way around the program. She started using Excel when she first entered the industry as a marketing intern. Soon, she realized that learning the often-overlooked spreadsheet program was no piece of cake. In her articles, she attempts to brief out complex topics to help beginner to intermediate-level Excel users. Asmi uses Excel for everything, including creating a grocery list to managing her personal finance. She’s a bit dramatic when it comes to the Flash Fill feature; so much so that could write a eulogy out of it. When she’s not working, you’ll find her learning a new recipe, or cleaning up her mess (out of the failed recipe).

      Related Posts

      Excel By Nisha Gurung

      How to Compare Two Columns in Excel Using VLOOKUP

      Excel By Nisha Gurung

      How to Share Excel Files with Multiple Users

      Excel By Nisha Gurung

      How to Filter Based on a List in Excel

      Add A Comment
      Table of ContentsToggle Table of ContentToggle
      • What is HLOOKUP?
      • Arguments Used in HLOOKUP
      • Application of the HLOOKUP Function
        • Example 1: Use HLOOKUP to Return an Exact Match
        • Example 2: Use HLOOKUP to Return an Approximate Match
        • Example 3: Using Wildcards in HLOOKUP
      • Use Data Validation to Make HLOOKUP Dynamic
      • Home
      • About Us
      • Privacy Policy
      © 2025 Inside The Web

      Type above and press Enter to search. Press Esc to cancel.