For working professionals
For fresh graduates
More
27. Columns in Excel
33. Count In Excel
49. Slicers in Excel
54. Solver in Excel
56. Macros In Excel
Once, I had to work on a last-minute assignment on summarizing sales. I was pretty sure that I wouldn’t make it on time but luck had something else for me.
I immediately recalled the spreadsheet trick from the old days. Besides, the sales report had all the necessary codes in the first column, and the remainder of the figures in the next ones. Perfect for an H LOOK UP in Excel (Correct format: HLOOKUP)!
Aside from the numerous other Excel functions I was well-versed in, knowing this one surely saved the day. Starting from sorting data to saving data in my projects, this function has helped me a great deal till this day.
If you wish to learn how I did, keep reading about how an Excel HLOOKUP function can benefit you too!
The HLOOKUP function in Excel stands for horizontal lookup. This function helps you identify a specific value in a row, also known as a table array. By executing this function, you can find the same value from a different row in the same column.
Let's understand the syntax of the H LOOK UP formula in Excel:
HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
Imagine a data table with product codes placed in the first row.
Let’s call it A1:D1 and add the corresponding prices in the second row (A2:D2). Your goal is to find the price of the product with the code “ABC which is located in cell B1.
Here’s how you should put your values for the ideal results.
According to the HLOOKUP in Excel formula, your syntax should look like this:
=HLOOKUP("ABC", A1:D1, 2, FALSE)
To break down your syntax, this is the explanation:
A prerequisite to using H LOOK UP in Excel is to find the purpose of the function. By now, you’d have guessed that we are trying to explore a value in a horizontally-arranged table. Let’s start the next steps now:
Locate the data table that you’re going to work with and ensure the lookup value exists in the first row of the table.
Click on the cell in which you want the result to be displayed. After that, type HLOOKUP(.
Think of it as moving down vertically. A value of 1 retrieves from the second row (excluding the first row which holds your lookup criteria), 2 retrieves from the third row, and so on.
Finally, close the parentheses after your last argument, thereby completing the formula. Following that, press Enter and Excel will evaluate the formula for you.
Here's how to conduct an approximate match using HLOOKUP in Excel:
Ensure your data is in a table format with the lookup values in the first row.
In the desired cell, type =HLOOKUP("XYZ", A1:D3, 3, TRUE)
Imagine this table (A1:D3):
Result: This formula will return $0.75, the price of the closest item (DEF) because "XYZ" is not present.
Here's how to conduct an exact match in HLOOKUP with an Excel table:
Steps:
Organize your data in a table format and ensure the lookup value you want to find is present in the first row of the table.
Click on the cell where you want the result to be displayed and type `=HLOOKUP(`
Write the formula and type the cell range (e.g., A1:D10) or select the table area.
Source - MS Excel
Imagine you have a data table in cells A1:D2 with product codes (A1:A2) and corresponding prices (B1:B2). You want to find the exact price of the product with code "ABC" (located in B1).
Syntax:
=HLOOKUP("ABC", A1:D2, 2, FALSE)
Understanding the difference between the two functions is as easy as understanding directions to a street.
The VLOOKUP function essentially deals with vertical lookups and retrieves data from the same column in a different row. Hlookup does just the opposite by retrieving data from the same column but different rows. Here’s a table:
Feature | VLOOKUP | HLOOKUP |
Search direction | Vertical | Horizontal |
Data arrangement | Suitable for data organized in columns | Suitable for data organized in rows |
Formula syntax | C10=VLOOKUP(lookup_value, table_array, col_index_num, range_lookup) | D10=HLOOKUP(lookup_value, table_array, row_index_num, range_lookup) |
To conclude, VLOOKUP is more sought after within Excel as it can gather wider info from a wider range of applications.
Example: You have data in Sheet 2 (A1:D10) of the current workbook and want to find the price of a product with code "ABC" (located in cell B1 of this sheet).
Formula (assuming data is in Sheet 2):
=HLOOKUP("ABC", 'Sheet2'!A1:D10, 2, FALSE)
Assuming that the data exists in a different workbook named “data.xls
=HLOOKUP("ABC", [C:\Users\Documents\data.xlsx]Sheet1!A1:D10, 2, FALSE)
There are two ways to go about it.
1. Using an Array formula
By using this method, you can manipulate the formula to return an array of your desired value.
Syntax:
{=HLOOKUP(lookup_value, table_array, ROW(A1:A1)+row_index_offset-1, FALSE)}
2. Using INDEX and MATCH
I prefer this method more as it gives me the liberty to trace multiple values.
Syntax:
{=INDEX(table_array, MATCH(lookup_value, first_column, 0), column_index_offset+COLUMN(A1)-1)}
Is your HLOOKUP not working? Here’s what you need to do to eliminate all discrepancies:
=HLOOKUP(lookup_value, table_array, row_index_number, [range_lookup]).
Although this is a quick an easy guide, to gain in-depth knowledge about this software, do consider taking up professional Excel certification courses to hone your skills.
The function, H LOOK UP in Excel is by far one of the most versatile Excel functions I’ve used to date. Having said that, I think you should give it a try and see for yourselves.
So far, I have established the usability of HLOOKUP in Excel determining the expected results. But did you know that you could go ahead and excel at Excel too? With upGrad’s array of courses, you can avail the top certifications and get working in no time.
Learn now!
Lookup is an Excel function that allows you to search for something specific within your spreadsheet. H LOOK UP in Excel is designed particularly for a horizontal lookup.
You can use the VLOOKUP function by searching for a specific value in one column and retrieving data from a different one.
The difference between VLOOKUP and H LOOK UP in Excel is an easy one. You use HLOOKUP when looking to extract data from a horizontal lineup whereas VLOOKUP works in the vertical front.
You can exercise the lookup function based on your data structure. You can either use the function manually or look it up using the Lookup Wizard. To do it manually, use this reference:
VLOOKUP(lookup_value, table_array, col_index_num, [is_sorted]).
When it comes to a formula HLOOKUP is used to retrieve data using specific values. Several lookups exist, however, the big shots are HLOOKUP (horizontal lookup) and VLOOKUP (vertical lookup.)
A lookup table is a reference table used to retrieve information based on a key or identifier. For instance, in a customer database, a lookup table might match customer IDs with their corresponding names and contact details, facilitating quick access to specific customer information.
The main difference between VLOOKUP and H LOOK UP in Excel is that HLOOKUP searches for the value in the first row of a table (horizontal lookup), while VLOOKUP searches for the value in the first column of a table (vertical lookup).
To make a lookup field in Excel, use VLOOKUP. Input "=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])", substituting terms accordingly.
Author
Talk to our experts. We are available 7 days a week, 9 AM to 12 AM (midnight)
Indian Nationals
1800 210 2020
Foreign Nationals
+918045604032
1.The above statistics depend on various factors and individual results may vary. Past performance is no guarantee of future results.
2.The student assumes full responsibility for all expenses associated with visas, travel, & related costs. upGrad does not provide any a.