Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 17

Planet Mercury Venus Earth Mars Jupiter Saturn uranus Neptune

Diameter 4878 12104 12755 6790 142796 120660 51118 49528


Temperature 468 869 59 -9.4 -238 -292 -391 -391

Planet Neptune
Diameter ?

3 things you should know about Excel Hlookup function


Whenever you do a horizontal lookup in Excel, please remem
facts:
The HLOOKUP function can only search in the top-most row
you need to look up somewhere else, consider using an Inde
HLOOKUP in Excel is case-insensitive, it does not distinguis
lowercase.
If range_lookup is set to TRUE or omitted (approximate mat
first row of table_array must be sorted in ascending order (A
cel Hlookup function
up in Excel, please remember the following

earch in the top-most row of table_array. If


se, consider using an Index / Match formula.
ive, it does not distinguish uppercase and

mitted (approximate match), the values in the


ted in ascending order (A-Z) left to right.
For instance, to find out the planet whose average
temperature is around -340 °F

Temperature -357 -346 -292 -238 -9.4 59 468 869


Planet uranus neptune saturn JUPITER mars earth mercury venus

Temparature -346
Planet ?

Index_Match
Roll No. Year of Birth Category Previous Exam Percentage Test Marks
1101 1995 GENERAL 73.23 19
1102 1996 SC/ST 74.26 19
1103 1997 GENERAL 68.38 15
1104 1996 GENERAL 76.51 17
1105 1996 SC/ST 74.54 16
1106 1996 BCA 63.97 19
1107 1996 GENERAL 73.28 18
1108 1996 BCB 59.19 19
1109 1995 EBC 72.81 19
1110 1996 EBC 64.72 15
1111 1996 BCB 59.14 18
1112 1996 BCA 61.42 16
1113 1996 GENERAL 68.46 19
1114 1996 GENERAL 70.08 19
1115 1996 GENERAL 68.5 18
1116 1996 BCA 62.97 19
1117 1995 GENERAL 77.13 16
1118 1995 SC/ST 60 20
1119 1995 BCA 74.15 19
1120 1995 SC/ST 60.69 16
1121 1995 SC/ST 61.03 18
1122 1995 SC/ST 58.9 15
1123 1995 BCA 68.9 18
1124 1995 GENERAL 77.54 19
1125 1995 GENERAL 73.31 15
1126 1995 GENERAL 72.44 18
1127 1995 BCA 72.59 18
1128 1995 GENERAL 72.92 19
1129 1995 SC/ST 60.95 16
1130 1995 GENERAL 74.14 16
1131 1995 EBC 72.86 19
1132 1995 GENERAL 73.41 20
1133 1995 GENERAL 70.14 20
1134 1995 BCA 64.42 17
1135 1995 BCA 63.86 16
1136 1995 SC/ST 56.44 15
1137 1995 SC/ST 56.75 16
1138 1995 BCB 70.44 14
1139 1995 GENERAL 71.31 17
1140 1995 SC/ST 69.44 15
1141 1995 EBC 64.74 18
1142 1995 SC/ST 66.46 14
1143 1995 SC/ST 53.83 15
1144 1995 GENERAL 68.03 14
1145 1995 GENERAL 64.39 19
1146 1994 BCB 64.97 18
1147 1994 BCA 70.67 14
1148 1994 BCB 60.08 18
1149 1994 BCB 61.03 20
1150 1994 BCB 71.49 20
1151 1994 EBC 71.51 14
1152 1994 BCA 59.89 19
1153 1994 SC/ST 60.5 15
1154 1994 GENERAL 70.49 17
1155 1994 EBC 69.19 18
1156 1994 BCB 56.47 14
1157 1994 EBC 78.28 15
1158 1993 BCB 65.08 19
1159 1993 GENERAL 70.83 18
1160 1993 SC/ST 57.5 17
University Code University Coding
MDU DU 4
KUK IPU 3
MDU KUK 2
IPU MDU 1
MDU PU 5
MDU
IPU
KUK
MDU
MDU
DU
DU
MDU
MDU
MDU
KUK
MDU
MDU
MDU
IPU
MDU
MDU
IPU
MDU
IPU
DU
MDU
PU
MDU
IPU
IPU
MDU
IPU
IPU
KUK
MDU
MDU
DU
MDU
MDU
DU
MDU
DU
IPU
MDU
MDU
MDU
DU
MDU
MDU
KUK
MDU
KUK
MDU
MDU
KUK
MDU
KUK
MDU
MDU
Objective and When to Use
There are two key requirements for using VLOOKUP HLOOKUP. The first is that you need to have your data
formatted in a matrix. Or, to put it in simpler terms:

Your data table needs to have lookup values on both the top and left hand side.

In the example below, we have Country as a potential lookup value down the leftmost column and Year as a
lookup value across the headings at the top. Your goal should be to find the intersection between these two
lookup arrays for particular values (for our example, we’ll be looking up the revenue amount for “Brazil” in
“2014“)

Revenue by Country and Year


Country 2012 2013 2014 2015
USA 813.45 3137.59 2473.27 366.03
Canada 4174.6 127.06 2678.82 3015.36
Mexico 3809.02 2383 1024.57 765.24
China 1291.55 1803.72 691.65 2251.67
Brazil 1588.89 2686.04 855.78 3128.29
Russia 1501.84 4367.75 1320.42 3553.69

The second requirement is unique to the VLOOKUP HLOOKUP combination formula:


You’ll need to add an additional row below your column headings to label the column numbers in your table
This requirement is specific to VLOOKUP HLOOKUP and is not a requirement of INDEX MATCH MATCH. If for
whatever reason you cannot insert a row identifying the columns of your data table, use INDEX MATCH MATCH
instead.

The Syntax
= VLOOKUP ( lookup_value , lookup_array , HLOOKUP ( lookup_value , lookup_array , 2 ,
FALSE ) , FALSE )

The VLOOKUP Formula


VLOOKUP will represent the foundation of your formula combination. The syntax for VLOOKUP is as follows:
= VLOOKUP ( lookup_value , lookup_array , col_index_num, [range_lookup] )
The HLOOKUP Formula
HLOOKUP has almost the exact same syntax and structure as VLOOKUP, with the exception that the lookup is
occurring horizontally and therefore, you need a row index number instead of a column one.
= HLOOKUP ( lookup_value , lookup_array , row_index_num, [range_lookup] )
As mentioned before, the purpose of the HLOOKUP formula in this combination is just to provide the column
reference for VLOOKUP to use.
reference for VLOOKUP to use.
Putting it All Together
to have your data Goal: Assume we want to find the Revenue amount for “Brazil” in the year “2014”
Step 1: Insert a row right below your field headings that identifies the column numbers of
your table. This was the second baseline requirement mentioned for VLOOKUP HLOOKUP
and is highlighted in green below.
Step 2: Start writing your VLOOKUP formula and select your vertical lookup value, in this
mn and Year as a case, the country “Brazil”
etween these two Step 3: For the table array, select the portion of your table excluding both the top row and
nt for “Brazil” in the additional row you just added (Please note: if you were instead to select the whole
table, the formula combination will still work; just make sure that you have the left hand
side of the your selection lined up with the edge of the table)
Step 4: Once you get to the column reference, start your HLOOKUP formula and select
your horizontal lookup value, in this case the year “2014”
Step 5: For the table array, select the mini table you created when you inserted a row to
identify the column headers. This table should only be two rows in terms of height.
Step 6: For the row reference, input 2. This is because your mini table only has two rows,
and you want it to return a value from the second row.
Step 7: Close out both your HLOOKUP and VLOOKUP formulas with FALSE for the range
lookup clause. This is because we want an exact match for both of our lookups.
What Excel Does
The first thing Excel does is process the formula from the inside out, thus addressing your
HLOOKUP formula first. The HLOOKUP portion is fairly simple because we only have a table
with 2 rows.
Moving horizontally across the top of the table array selected (green border table), stop at
the lookup value (“2014“) and return the value in the corresponding second row
(row_index = 2)
In this case, the formula resolves to 4. Therefore, 4 will be used as your column reference
for your VLOOKUP.
Next Excel will process your VLOOKUP formula.
Moving vertically down the left side of the table array selected (red border table), stop at
in your table the lookup value (“Brazil“) and return the value in the corresponding fourth column (result
H MATCH. If for of HLOOKUP = 4)
X MATCH MATCH The resulting value for the entire formula combination is $855.78.
Summary
VLOOKUP HLOOKUP is a widely used formula combination because of the familiarity of the
two formulas. Despite its disadvantages, VLOOKUP is still a more popular formula
than INDEX MATCH and understood by a much wider base of users. For that reason,
understanding VLOOKUP HLOOKUP is still a worthwhile exercise. If you’re ever in a
situation where you need to perform a matrix lookup, but either do not understand or plan
to hand off your file to someone that does not understand INDEX MATCH, consider using
VLOOKUP HLOOKUP as your lookup option.
kup_array , 2 ,

is as follows:

that the lookup is

rovide the column


2014”
mn numbers of
KUP HLOOKUP

p value, in this

e top row and


ect the whole
the left hand
ula and select

erted a row to
eight.
has two rows,

for the range


ps.

ddressing your
y have a table

table), stop at
second row

umn reference

table), stop at
column (result

miliarity of the
pular formula
that reason,
’re ever in a
rstand or plan
consider using
Student Name Aditya Deep Nitin Golu Mandeep Sandeep Manish Raju
Marks in Science 64 75 82 65 65 42 56 78
Marks in Maths 87 52 68 32 72 60 61 49
Marks in English 79 40 61 46 66 71 56 89

Objective 1: Fetch Sandeep Marks in English using HLOOKUP

Horizontal Lookup performs a case insensitive lookup. This means, it treats “STEVE” and “steve” as same.
While using HLOOKUP function ‘lookup_value’ should always be in the topmost row of the ‘table_array’.
‘range_lookup’ is an optional argument. If it is omitted then HLOOKUP takes its default value as TRUE (approximate
match).
If HLOOKUP cannot find the ‘lookup_value’, and ‘range_lookup’ is TRUE (approximate match), it uses the largest value
that is less than ‘lookup_value’.
Similar to VLOOKUP, HLOOKUP also supports wildcard characters (like: ‘*’, ‘?’) in the ‘lookup_value’ argument (only if
‘lookup_value’ is text). [See Example 2]
If ‘range_lookup’ is FALSE and HLOOKUP is unable to find the ‘lookup_value’ in the defined range, then it returns a
#N/A error.
If the ‘row_index_num’ is less than 1, HLOOKUP returns #VALUE! error. If it is greater than the number of columns in
‘table_array’, then it returns #REF! error.
60

as same.
_array’.
as TRUE (approximate

uses the largest value

alue’ argument (only if

ange, then it returns a

number of columns in
Student Name Aditya Deep Nitin Golu Mandeep Sandeep Manish Raju
Marks in Science 64 75 82 65 65 42 56 78
Marks in Maths 87 52 68 32 72 60 61 49
Marks in English 79 40 61 46 66 75 56 89

Find the Marks in English of a student who has got 75 marks in Science

Write an Horizontal LookUp formula to find the Maths marks of a student whose name starts with ‘G’

Our task is to apply an HLOOKUP formula and populate the History marks in the first table

Student Name Aditya Deep Nitin Golu Mandeep Sandeep Manish Raju
Marks in Science 64 75 82 65 65 42 56 78
Marks in Maths 87 52 68 32 72 60 61 49
Marks in English 79 40 61 46 66 75 56 89
Marks in History 64 75 59 98 30 37 84 35

Element Hydrogen Helium Lithium Beryllium Boron Carbon Nitrogen Oxygen


Atomic No. 1 2 3 4 5 6 7 8
Atomic Mass 1.01 4.00 6.94 9.01 10.81 12.01 14.01 16.00
Melting Point -259 -272 180 1278 2300 3500 -210 -218
40

#N/A

Student Name Aditya Deep Nitin Golu Mandeep Sandeep Manish


Marks in History 64 75 59 98 30 37 84

Flourine Neon
9 10
19.00 20.18
-220 -249

10.81

-210
Raju
35

You might also like