You are on page 1of 35

Three basic LOOKUP functions and INDEX and CHOOSE and MATCH:

VLOOKUP

HLOOKUP

LOOKUP

INDEX

CHOOSE

MATCH

VLOOKUP: Looks at a cell, then takes that value and goes over to a look up table where it looks in the first column, and when it
the first columns, it moves to the left in that row and retrieves a value from one of the tables columns and bring

Arguments

lookup_value
table_array

col_index_num

range_lookup

steps

4
e basic LOOKUP functions and INDEX and CHOOSE and MATCH:

Most common because most lookup tables like tax tables and price tables are orientated
vertically

Most tables are vertical, not horizontal, so using HLOOKUP is rare.

Although LOOKUP was one of the first functions in a spreadsheet, the VLOOKUP can do almost
everything that the LOOKUP does and more. The one thing that the LOOKUP can do that the
VLOOKUP (or HLOOKUP) can't do is retrieve a value to the left or above a lookup_value column or
row; it can also have a column and a row area. LOOKUP function must have the lookup_vector
sorted in ascending order. LOOKUP looks up the greatest value that does not exceed a
specified value anywhere in a table or range .

Good when you have more than one table to look values up in. (non-contiguous ranges must be
in parenthesis and stored all on the same worksheet). You can also have a table with intersection
lookup values where INDEX and MATCH can be used together to look up labels and return
intersection of two labels. Also can be used as a replacement for VLOOKUP when the data you
want to retrieve is to the left of the lookup column.

CHOOSE can return a value or a range from a list of 1 to 254 arguments.

This function tells you the ordinal position of an item in a list

d goes over to a look up table where it looks in the first column, and when it finds the corresponding value in
ft in that row and retrieves a value from one of the tables columns and brings it back to the cell.

Descriptions

The date you want to look up. This value can be a number, text, a logical value, or a name or cell
reference that refers to a value.
The lookup table. The first column must have the values to look up such as part number, part
name, tax bracket wage figures, grade number intervals. The other columns can have data that
you want to retrieve such as part price, tax rates, tax paid from earlier brackets.

The number of the column containing the data you want to retrieve. The number 1 indicates that
first column; 2 indicates the second column.

The type of lookup you want to perform: TRUE or FALSE. With TRUE (the default), the
VLOOKUP function finds the greatest value that does not exceed the lookup_value value.
When the lookup type is TRUE, the first column must be sorted in ascending order, otherwise the
VLOOKUP might not retrieve the correct value. With FALSE, the VLOOKUP looks for an exact
match of the lookup_value.

VLOOKUP Algorithm

Looks for an exact match. If duplicate values it ignores the second value. If no match it goes to
step 2

If the lookup_value is smaller than the first value in the first column, #N/A error is displayed. If
the value is greater than the first value in the first column, it goes to step 3

The VLOOKUP function continues checking until it sees a value bigger than the lookup_value,
then it uses the previous row and retrieves a value from that row.

It looks to see if the next value is the last value in the table, if it is it retrieves a value from this
row, otherwise it repeats step 3
1) The V in VLOOKUP means Ver

2) VLOOKUP function returns something to a cell or formula

3) VLOOKUP(cell you want to lookup, Lookup Table, Column Designation of value you want to re

4) Approximate value means that when the function sees a value that is bigger than the

For approximate value, VLOOKUP takes the value you tell it to look at, goes to the first column of the lookup t
#N/A otherwise it races down the column until it sees a value bigger than the lookup_value and then it uses th
5) brings it back to the cell or form

6) Using named ranges for lookup table is usually efficient. Using Data Validation

7) When creating the lookup_table in the formula itself: 1) enclose the table in curly brackets { }; 2) column ele

1 Example 1: Deliver value to cell. Find approximate value from column 2 of lookup table.
0
0.65
0.75
0.85
0.95

Score
0.7500

2 Example 2: Deliver value to cell. Find exact value from column 2 of lookup table.
Product 1
Product 2
Product 3
Product 4
Product 5

Product
PRODUCT 3

3 Example 3: Deliver value to cell. Find value from column 2 & 3. Use COLUMN function (tells you what c
Product
Boom01
Boom02
Boom03
Boom04
Boom05
Boom06
Boom07
Boom08
Boom09

Product
Boom07

4 Example 4: Use VLOOKUP to deliver a value to a formula.


Days Late
0
30
60
90

Days Late
20

5 Example 5: Use multiple VLOOKUPs in 1 formula to deliver mutiple values to a fo


Manufactur
Income Sta
Projected Net Income For The
Net Revenues
Expenses
Net Income Before Income Taxes
Tax Expense
Net Income

Example 6: Create lookup_table in formula itself "hard code table into formula": 1) enclose the table in curly
brackets { }; 2) column elements are separated by commas ,; 3) row elements are separated by semicolons ;.
Use RANDBETWEEN to generate random integers (in 2003 you have to go to Tools menu, Add-ins, then
6 check Analysis ToolPak".)
1
2
3
4

Find Name Randomly

Find Name Randomly


The V in VLOOKUP means Vertical.

VLOOKUP function returns something to a cell or formula that it found in a lookup table.

OOKUP(cell you want to lookup, Lookup Table, Column Designation of value you want to return to the cell, Exact Match = 0 or approximate v

Approximate value means that when the function sees a value that is bigger than the lookup_value, it stops and uses that row above t

ue, VLOOKUP takes the value you tell it to look at, goes to the first column of the lookup table (sorted ascending) and if the first value is les
ces down the column until it sees a value bigger than the lookup_value and then it uses the row above, then it goes to the column that you
brings it back to the cell or formula.

Using named ranges for lookup table is usually efficient. Using Data Validation for the lookup cell helps the accuracy of your ta

lookup_table in the formula itself: 1) enclose the table in curly brackets { }; 2) column elements are separated by commas ,; 3) row elemen

: Deliver value to cell. Find approximate value from column 2 of lookup table.
F
D
C
B
A

Grade
C

e 2: Deliver value to cell. Find exact value from column 2 of lookup table.
$ 20.00
$ 25.00
$ 15.00
$ 15.00
$ 16.00

Price
15

eliver value to cell. Find value from column 2 & 3. Use COLUMN function (tells you what column you are in).
Price Description
$15.00 Flying Range is 10
$30.00 Flying Range is 20
$40.00 Flying Range is 50
$45.00 Flying Range is 60
$65.00 Flying Range is 70
$69.00 Flying Range is 80
$100.00 Flying Range is 85
$110.00 Flying Range is 110
$165.00 Flying Range is 160

Price Description
100 Flying Range is 85

Example 4: Use VLOOKUP to deliver a value to a formula.


% Late Fee
1%
2%
3%
5%

Balance Late Charge


$600.00 $6.00

Example 5: Use multiple VLOOKUPs in 1 formula to deliver mutiple values to a formula. Also, Use IF function or IFERROR function
Manufacturers Plus
Income Statement
Projected Net Income For The Years Ended December 31
2013 2014
$450,000.00 $495,000.00
500,000.00 510,000.00
(50,000.00) (15,000.00)

($50,000.00) ($15,000.00)

okup_table in formula itself "hard code table into formula": 1) enclose the table in curly
n elements are separated by commas ,; 3) row elements are separated by semicolons ;.
EN to generate random integers (in 2003 you have to go to Tools menu, Add-ins, then
check Analysis ToolPak".)
Suix
Fred
Chin
Sheliadawn

Chin
n a lookup table.

Exact Match = 0 or approximate value = 1 (default))

it stops and uses that row above that value.

cending) and if the first value is less than the lookup_value it returns
hen it goes to the column that you specified and gets that value, then

cell helps the accuracy of your task.

rated by commas ,; 3) row elements are separated by semicolons ;.


e IF function or IFERROR function to solve #N/A error problem

d December 31
2015 2016 2017 2018
$544,500.00 $598,950.00 $658,845.00 $724,729.50
520,200.00 530,604.00 541,216.08 552,040.40
24,300.00 68,346.00 117,628.92 172,689.10

$24,300.00 $68,346.00 $117,628.92 $172,689.10

29,125.28 Tax Tables 2004

VLOOKUP
Reference

0
50,001
75,001
100,001
335,001
10,000,001
15,000,001
18,333,334

Assumptions
Increase In Sales
Increase in Expenses
If Taxable Income Is:

Tax Amount From Tax Rate For


Over - But Not Over Previous Bracket Remaining Amount

$ 0 $ 50,000 15%
50,000 75,000 7,500 25%
75,000 100,000 13,750 34%
100,000 335,000 22,250 39%
335,000 10,000,000 113,900 34%
10,000,000 15,000,000 3,400,000 35%
15,000,000 18,333,333 5,150,000 38%
18,333,333 6,416,667 35%

10%
2%
Product Price Description CLASS
Boom01 $15.00 Flying Range is 10 A
Boom02 $30.00 Flying Range is 20 B
Boom03 $40.00 Flying Range is 50 C
Boom04 $45.00 Flying Range is 60 D
Boom05 $65.00 Flying Range is 70 E
Boom06 $69.00 Flying Range is 80 F
Boom07 $100.00 Flying Range is 85 G
Boom08 $110.00 Flying Range is 110 H
Boom09 $165.00 Flying Range is 160 I

Boom05 65 Flying Range is 70 E


HLOOKUP is the same as VLOOKUP except the H means
1) Horizontal
Most tables are vertical, not horizontal, so using HLOOKUP is
2) rare.

Product 1 Product 2 Product 3 Product 4 Product 5 Product Product 2


$ 20.00 $ 25.00 $ 15.00 $ 15.00 $ 16.00 Price 25
Although LOOKUP was one of the first functions in a spreadsheet, the VLOOKUP can do almost
everything that the LOOKUP does and more. The one thing that the LOOKUP can do that the
VLOOKUP (or HLOOKUP) can't do is retrieve a value to the left or above a lookup_value column or
row; it can also have a column and a row area. LOOKUP function must have the lookup_vector sorted
in ascending order. LOOKUP looks up the greatest value that does not exceed a specified value
1) anywhere in a table or range.
2)

Product Price Description


Boom01 $15.00 Flying Range is 10
Boom08 $110.00 Flying Range is 110
Boom09 $165.00 Flying Range is 160
Boom02 $30.00 Flying Range is 20
Boom03 $40.00 Flying Range is 50
Boom04 $45.00 Flying Range is 60
Boom05 $65.00 Flying Range is 70
Boom06 $69.00 Flying Range is 80
Boom07 $100.00 Flying Range is 85

Description Product
Flying Range is 60 Boom04 Boom04
Boom01 Boom08 Boom09 Boom02 Boom03 Boom04 Boom05 Boom06
Boom07
1) The MATCH function looks up a value and tells you what relative position it is in the list.

If match_type is 1, MATCH finds the largest value that is less than or equal to lookup_value.
2) Lookup_array must be placed in ascending order: ...-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE.

If match_type is 0, MATCH finds the first value that is exactly equal to lookup_value. Lookup_array
3) can be in any order.

If match_type is -1, MATCH finds the smallest value that is greater than or equal to lookup_value.
4) Lookup_array must be placed in descending order: TRUE, FALSE, Z-A, ...2, 1, 0, -1, -2, ..., and so on.
5) If match_type is omitted, it is assumed to be 1.

Allowances
0 1 2 3 4
0 $6.00 $5.00 $4.00 $3.00 $2.00
100 $7.00 $6.00 $5.00 $4.00 $3.00
200 $8.00 $7.00 $6.00 $5.00 $4.00
Income

300 $9.00 $8.00 $7.00 $6.00 $5.00


400 $10.00 $9.00 $8.00 $7.00 $6.00
500 $11.00 $10.00 $9.00 $8.00 $7.00
600 $12.00 $11.00 $10.00 $9.00 $8.00
700 $13.00 $12.00 $11.00 $10.00 $9.00

Relative Position
in list
Income 250 3
Allowances 2
5
$1.00
$2.00
$3.00
$4.00
$5.00
$6.00
$7.00
$8.00
INDEX has 2 different uses: 1) look up a value that is at the intersection of a row and column, or 2) look up a
specific table and then within that specific table look up a value that is at the intersection of a row and
1) column.

Good when you


have more than
one table to
look values up
in. (non-
contiguous
ranges must be
in parenthesis
and stored all
on the same
worksheet). You
can also have a
table with
intersection
lookup values
where INDEX
and MATCH can
be used
together to look
up labels and
return
intersection of
two labels. Also
can be used as
a replacement
for VLOOKUP
when the data
you want to
retrieve is to
the left of the
2) lookup column.

Example 1: Look
up a value that
is at the
intersection of a
row and
3) column.
Example 2: Look
up a specific
table and then
within that
specific table
look up a value
that is at the
intersection of a
row and
column.

4)

1 Allowances
0 1 2 3
0 $6.00 $5.00 $4.00 $3.00
100 $7.00 $6.00 $5.00 $4.00
200 $8.00 $7.00 $6.00 $5.00
Income

300 $9.00 $8.00 $7.00 $6.00


400 $10.00 $9.00 $8.00 $7.00
500 $11.00 $10.00 $9.00 $8.00
600 $12.00 $11.00 $10.00 $9.00
700 $13.00 $12.00 $11.00 $10.00

Relative Position in
list Tax
Income 250 3 $6.00
Allowances 2 3

2 Customer Type 10

Shipping Method - Standard

Region Rail Truck Plane Ship

NW $ 0.125 $ 0.135 $ 1.525 $ 0.225


West $ 0.205 $ 0.145 $ 2.025 $ 0.245
SW $ 0.265 $ 0.165 $ 2.125 $ 0.225
MidWest $ 0.305 $ 0.185 $ 2.275 $ 0.225
East $ 0.475 $ 0.425 $ 3.525 $ 0.375

Customer Type 20
Shipping Method - Preferred
Region Rail Truck Plane Ship
NW $ 0.115 $ 0.125 $ 1.375 $ 0.205
West $ 0.185 $ 0.135 $ 1.825 $ 0.215
SW $ 0.245 $ 0.155 $ 1.915 $ 0.205
MidWest $ 0.275 $ 0.165 $ 2.055 $ 0.205
East $ 0.435 $ 0.385 $ 3.175 $ 0.345

Customer Type 30
Shipping Method - Most Preferred
Region Rail Truck Plane Ship
NW $ 0.105 $ 0.115 $ 1.245 $ 0.175
West $ 0.175 $ 0.125 $ 1.645 $ 0.165
SW $ 0.215 $ 0.135 $ 1.725 $ 0.185
MidWest $ 0.255 $ 0.155 $ 1.845 $ 0.185
East $ 0.385 $ 0.345 $ 2.865 $ 0.305
w and column, or 2) look up a
he intersection of a row and
s
4 5
$2.00 $1.00
$3.00 $2.00
$4.00 $3.00
$5.00 $4.00
$6.00 $5.00
$7.00 $6.00
$8.00 $7.00
$9.00 $8.00

Region Shipping Method

NW Rail

West Truck

SW Plane
MidWest Ship
East

Region
West
Shipping Method
Truck
Customer Type
Customer Type 20
Shipping per Unit
0.135
Customer Type

Customer Type 10

Customer Type 20

Customer Type 30
INDEX has 2 different uses: 1) look up a value that is at the intersection of a row and column, or 2) look up a
1) table and then within that specific table look up a value that is at the intersection of a row and colum

2) The MATCH function looks up a value and tells you what relative position it is in the list.

Good when you have more than one table to look values up in. (non-contiguous ranges must be in parenth
stored all on the same worksheet). You can also have a table with intersection lookup values where INDE
MATCH can be used together to look up labels and return intersection of two labels. Also can be used a
3) replacement for VLOOKUP when the data you want to retrieve is to the left of the lookup column.

1 Example 1: INDEX and MATCH can be used together to look up labels and return interse
Allowances
0 1 2
0 $6.00 $5.00 $4.00
100 $7.00 $6.00 $5.00
200 $8.00 $7.00 $6.00
Income

300 $9.00 $8.00 $7.00


400 $10.00 $9.00 $8.00
500 $11.00 $10.00 $9.00
600 $12.00 $11.00 $10.00
700 $13.00 $12.00 $11.00

Tax
Income 250 $6.00
Allowances 2

Example 2: Use INDEX as a substitute for VLOOKUP when the value you want to return is to the left of the
2 column.
Product Price Description
Boom01 $15.00 Flying Range is 10
Boom02 $30.00 Flying Range is 20
Boom03 $40.00 Flying Range is 50
Boom04 $45.00 Flying Range is 60
Boom05 $65.00 Flying Range is 70
Boom06 $69.00 Flying Range is 80
Boom07 $100.00 Flying Range is 85
Boom08 $110.00 Flying Range is 110
Boom09 $165.00 Flying Range is 160

Description
Flying Range is 110
3 Example 3: Use INDEX and MATCH for looking up a specific table and then wi
Customer Type 10

Shipping Method - Standard

Region Rail Truck Plane

NW $ 0.125 $ 0.135 $ 1.525


West $ 0.205 $ 0.145 $ 2.025
SW $ 0.265 $ 0.165 $ 2.125
MidWest $ 0.305 $ 0.185 $ 2.275
East $ 0.475 $ 0.425 $ 3.525

Customer Type 20
Shipping Method - Preferred
Region Rail Truck Plane
NW $ 0.115 $ 0.125 $ 1.375
West $ 0.185 $ 0.135 $ 1.825
SW $ 0.245 $ 0.155 $ 1.915
MidWest $ 0.275 $ 0.165 $ 2.055
East $ 0.435 $ 0.385 $ 3.175

Customer Type 30
Shipping Method - Most Preferred
Region Rail Truck Plane
NW $ 0.105 $ 0.115 $ 1.245
West $ 0.175 $ 0.125 $ 1.645
SW $ 0.215 $ 0.135 $ 1.725
MidWest $ 0.255 $ 0.155 $ 1.845
East $ 0.385 $ 0.345 $ 2.865

customer type 40
Shipping Method - Most Preferred
Region Rail Truck Plane
NW $ 0.789 $ 0.115 $ 1.245
West $ 0.175 $ 0.125 $ 1.645
SW $ 0.215 $ 0.135 $ 1.725
MidWest $ 0.255 $ 0.155 $ 1.845
East $ 0.385 $ 0.345 $ 2.865
of a row and column, or 2) look up a specific
the intersection of a row and column.

elative position it is in the list.

ntiguous ranges must be in parenthesis and


ersection lookup values where INDEX and
on of two labels. Also can be used as a
is to the left of the lookup column.

to look up labels and return intersection of two labels


Allowances
3 4 5
$3.00 $2.00 $1.00
$4.00 $3.00 $2.00
$5.00 $4.00 $3.00
$6.00 $5.00 $4.00
$7.00 $6.00 $5.00
$8.00 $7.00 $6.00
$9.00 $8.00 $7.00
$10.00 $9.00 $8.00

u want to return is to the left of the lookup

Product
Boom08
king up a specific table and then within that specific table looking up a value that is at the intersection of a row and column.
Region Shipping Method

ard NW Rail

Ship West Truck

$ 0.225 SW Plane
$ 0.245 MidWest Ship
$ 0.225 East
$ 0.225
$ 0.375 Region
no. of units 7 NW
shipping cost per unit 0.789 Shipping Method
rred total shipping cost 5.523 Rail
Ship Customer Type
$ 0.205 customer type 40
$ 0.215 Shipping per Unit
$ 0.205 0.789
$ 0.205
$ 0.345

eferred
Ship
$ 0.175
$ 0.165
$ 0.185
$ 0.185
$ 0.305

eferred
Ship
$ 0.175
$ 0.165
$ 0.185
$ 0.185
$ 0.305
a row and column.
Customer Type

Customer Type 10

Customer Type 20

Customer Type 30
customer type 40
1) CHOOSE can return a value or a range from a list of 1 to 254 arguments.
2)

Select Garbage Duty for Week


Select Garbage Duty for Week Chin
1) Ctrl + Shift + F3 "Create Names From Selection"
2) A space is the intersector operator
3)
4)
5)

Dept01 Dept02 Dept03 Dept04


Jan $4,844 $3,548 $2,660 $1,535
Feb $5,776 $4,678 $3,602 $2,929
Mar $6,819 $5,936 $4,637 $3,604
Apr $7,663 $6,813 $5,599 $4,824
May $8,723 $7,948 $6,925 $5,717
Jun $9,582 $8,633 $7,583 $6,742
Jul $10,831 $9,888 $8,774 $7,933
Aug $11,581 $10,759 $9,835 $8,913
Sep $12,881 $11,806 $10,827 $9,954
Oct $13,695 $12,548 $11,974 $10,838
Nov $14,509 $13,525 $12,725 $11,947
Dec $15,997 $14,858 $13,634 $12,969

Type Intersection in:


Apr
Dept04
Dept05
$990
$1,925
$2,514
$3,804
$4,517
$5,607
$6,525
$7,665
$8,992
$9,816
$10,759
$11,971

You might also like