0% found this document useful (0 votes)
378 views12 pages

How To Use HLOOKUP in Excel

The HLOOKUP function in Excel searches for a value within a table array and returns a value from the same column. It has four components: the value to look up, the range of the table array, the row number of the return value, and a logical value (TRUE/FALSE) to specify an exact or approximate match. An example demonstrates using HLOOKUP to find the number of oranges sold each day by looking up the fruit name in a table and returning the corresponding value. Setting the last component to TRUE allows HLOOKUP to return the closest match if an exact value is not found.

Uploaded by

Rohit Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
378 views12 pages

How To Use HLOOKUP in Excel

The HLOOKUP function in Excel searches for a value within a table array and returns a value from the same column. It has four components: the value to look up, the range of the table array, the row number of the return value, and a logical value (TRUE/FALSE) to specify an exact or approximate match. An example demonstrates using HLOOKUP to find the number of oranges sold each day by looking up the fruit name in a table and returning the corresponding value. Setting the last component to TRUE allows HLOOKUP to return the closest match if an exact value is not found.

Uploaded by

Rohit Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Excel glossary

How to use HLOOKUP in Excel


HLOOKUP in Excel stands for ‘Horizontal Lookup’. It is a function that
makes Excel search for a certain value in a row (the so called ‘table
array’), in order to return a value from a different row in the same
column.

Definition HLOOKUP function


A HLOOKUP function in Excel exists of 4 components:
1. The value you want to look up;
2. The range in which you want to find the value and the return
value;
3. The number of the row within your defined range, that contains
the return value;
4. 0 or FALSE for an exact match with the value your are looking for;
1 or TRUE for an approximate match.

Syntax: HLOOKUP([value], [range], [row number], [false or true])

HLOOKUP example
In our example we show how many pieces of fruits are sold per day in
the first week of May. We want to find out how many oranges were
sold each day of the week.

First, select a cell in which you want to publish the sold amount of
oranges. We start with ‘Day 1’:
In our example we show how many pieces of fruits are sold per day in
the first week of May. We want to find out how many oranges were
sold each day of the week.

First, select a cell in which you want to publish the sold amount of
oranges. We start with ‘Day 1’:
Then we select the value (from row 1) we want to look up, in this case
it’s ‘Orange’ in cell F1.

We can insert this value as a string: “Orange” (image 1), or as a cell


reference: F1 (image 2):
Image 1, Value as a String
Image 2, Value as a  Cell Reference

Next we enter ‘;’ and select the range (or table array) in which we want
to find the lookup value and the return value. In this case it is range
(B1:H8):
Then we enter ‘;’ and the number of the row within the defined range
in which we want to look for the return value. In this case it is row 2
(for day 1), followed by ‘;’ and ‘0’ or ‘FALSE for an exact match with the
lookup value ‘Orange’:
When we press enter, we get the amount of oranges sold on day 1:
To look up the value for day 2, we can copy the HLOOKUP formula,
and replace row 2 with row 3:

=HLOOKUP(“Orange”;B1:H8;3;0):
We can repeat this proces for each formula within the formula
range B12:H12.

In this example we only have a small list of dates, but imagine you
have a long list that publishes several years and you wish to use a
certain value in other worksheets! Using HLOOKUP (and VLOOKUP)
the user only has to change a certain value in one worksheet and it will
automatically be changed in all other relevant places.

But what if you’re not certain about your lookup value? Then you can
consider an approximate match (set False to True).
Approximate Match in HLOOKUP
When we enter the word ‘Ornage’ in our HLOOKUP function, because
we are not sure about the spelling of the value that we’re looking for.
The formula as we designed it gets confused, because it can’t find this
value in the table array. It returns the standard Excel error #N/A:

Let us change the ‘0’ (or ‘False’) component of our HLOOKUP function
to ‘1’ or ‘TRUE’:

=HLOOKUP(“Ornage”;B1:H8;2;1)
Now we have asked the function to look for an approximate match
with ‘Ornage’. If it can’t find the exact match, it will look for the closest
match to the value ‘Ornage’, less than ‘Ornage’, which is ‘Orange’:

Would we enter ‘Arange’ in stead of “Orange”, the function returns 21,


because then ‘Apple’ is the closest match less than ‘Orange’ (based on
the alphabet):

You might also like