HLOOKUP is one of Excel’s more powerful Lookup functions If your data is organized into horizontal rows, you can use the HLOOKUP function to search for a value in the first row of your data table and return a corresponding value from another row. The easiest way to understand this function is to look at an example. So let’s get started
We have a table of data containing order information We can use HLOOKUP to locate a unit price based on a particular Order ID value to get started, let’s begin by entering the HLOOKUP command As you can see, the HLOOKUP function takes 4 parameters. The first parameter that we will enter is the value that we are trying to locate in the first row of the table
In our example, we want to search, for Order ID number 10251. The second parameter we will need to enter is the table or source of the data HLOOKUP will use. The range provided must include both the first row that will be searched for our first parameter value and the row containing our hopeful result you can provide either a range of cells or a named range for this parameter. For example, we will enter the range A1:G3. The third parameter we must enter is the position number in the table where the return value can be found
A value of 1 indicates the first row in the table, a value of 2 indicates the second row and so on. Since we are looking for the Unit Price, we will enter a 2 which represents cells A2:G2. Finally and most importantly is HLOOKUP’s fourth parameter this parameter determines whether an exact match or an approximate match will be done when looking for the first parameter a value of FALSE means that HLOOKUP is looking for an exact match a value of TRUE means that an approximate or close match will be returned Unless you have a specific reason for looking for an approximate match you should always use FALSE to return an exact match otherwise the HLOOKUP could return some unexpected results.
Now that we have entered all of HLOOKUP’s parameters, let’s complete the command to examine the result you should see the unit price of $16.80 appear $16.80 is the unit price that corresponds to the Order ID number 10251 that we searched for this covers a simple example of how to use Excel’s HLOOKUP function.
If you would like to see more HLOOKUP examples and want to learn advanced excel then visit our tipa.in where you can also start advanced excel course. In case of any query call us at +91-9213855555.