VLOOKUP() Function

Relative, Absolute,
& Mixed References
Relative Reference
(Address)
A
1
B
C
D
5
2
6
3
4
 In C3, =A1+B2 means
Display sum of the content of cell which is 2 columns to the left and 2 rows above
and the content of cell which is 1 column to the left and 1 row above.
When this formula is copied to other cells, the same instruction is copied.
E.g., if the formula is copied to D4, it becomes =B2+C3.
Absolute Reference
(Address)
A
1
2
B
C
D
5
6
3
4
 In C3, =$A$1+B2 means
Display the sum of the content of cell which is at A1
and the content of cell which is 1 column to the left and 1 row above.
When this formula is copied to other cells, the same instruction is copied.
E.g., if the formula is copied to D4, it becomes =$A$1+C3.
Mixed Reference
(Address)
A
1
B
C
D
5
2
6
3
7
4
8
 In C2, =$A$1+$B2 means
Add the content of cell which is at A1
and the content of cell which is in column B and in the same row.
When this formula is copied to other cells, the same instruction is copied.
E.g., if the formula is copied to C4, it becomes =$A$1+$B4.
Mixed Reference (cont.)
A
1
5
2
6
B
C
D
7
8
9
3
4
 In B3, =$A$1+B$2 means
Add the content of cell which is at A1
and the content of cell which is in the same column and in row 2.
When this formula is copied to other cells, the same instruction is copied.
E.g., if the formula is copied to C4, it becomes =$A$1+C$2.
IF() Function
A
B
C
1
Name
Exam
Grade
2
Adams
87
Pass
3
Benson
92
Pass
4
Carson
68
Fail
5
Danson
78
Pass
D
E
F
6
=IF(B2>=70,”Pass”,”Fail”)
IF() Function
 Form
 =IF(condition,
value-for-TRUE-case,
value-for-FALSE-case)
 Example
 Assume: B2 contains semester average
 Then, in C2, we can have:
=IF(B2>=70, “Pass”, “Fail”)
VLOOKUP() Function
 Suppose letter grades for exam scores are
assigned as follows:
A – 90 or above
B – 80 or above, but less than 90
C – 70 or above, but less than 80
D – 60 or above, but less than 70
F – less than 60
 Use VLOOKUP() function to assigning letter
grade to a score, buy looking up a table.
Grade Table Lookup
A
B
C
1
Name
Exam
Grade
2
Adams
87
B
3
Benson
92
A
4
Carson
68
D
5
Danson
78
C
D
E
F
G
6
H
Criteria
7
0
F
8
60
D
9
70
C
10
80
B
11
90
A
VLOOKUP()
 Format
=VLOOKUP( Value to look up,
The range of the table,
The column number containing
the grade)
 For example,
In the preceding case
=VLOOKUP(B2, $G$7:$H$11,2)
With VLOOKUP(),
Remember…
 In the VLOOKUP(), the 2nd argument, the
range for the lookup table, should be in
absolute address.
 In the lookup table, values to be looked
up should be in ascending order (from
small to larger).
Tax Table Lookup
A
B
C
1
Name
Income
Tax Rate
2
Adams
18000
0%
3
Benson
85000
15%
4
Carson
28000
10%
5
Danson
31000
15%
6
Erickson
125000
?
F
G
H
Tax Rate
7
0
0%
8
20,000
10%
9
50,000
15%
10
100,000 20%
11
200,000 30%
Your Turn
 Given the preceding table, look up the
Tax Rate for Erickson with the VLOOK()
function.
HLOOKUP
(Horizontal Lookup Table)
A
B
C
D
1
Name
Exa
m
Grade
2
Adams
87
B
3
Benson
92
A
4
Carson
68
D
5
Danson
78
C
E
F
6
7
8
Criteria
9
0
60
70
80
90
10
F
D
C
B
A
11
G
H
HLOOKUP()
 Format
=HLOOKUP( Value to look up,
The range of the table,
The row number containing
the grade)
 For example,
In the preceding case
=HLOOKUP(B2, $B$(:$F$10,2)
With HLOOKUP(),
Remember…
 In the HLOOKUP(), the 2nd argument, the
range for the lookup table, should be in
absolute address.
 In the lookup table, values to be looked
up should be in ascending order (from
small to larger) from left to right.