Lookup and Refernces
Lookup and Refernces
Topics:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Highline Excel 2016 Class 11: Lookup Functions & Formulas, Comprehensive Lessons VLOOKUP & More
Data Validation List. VLOOKUP, Exact Match. IF & ISBLANK functions. Goal: Create Invoice.
HLOOKUP with Exact Match Lookup. Goal: Lookup Tyrone's Phone Number. Horizontal Lookup is rare.
VLOOKUP with Approximate Match Lookup. Goal: Lookup Pipe size.
VLOOKUP with Approximate Match Lookup. Goal: Lookup Commission Paid.
VLOOKUP with Approximate Match Lookup. Cell Reference for Column Index Number. Goal: Get Rating and Commission.
VLOOKUP and MATCH functions with Exact Match Lookup. MATCH for Column Index Number. Goal: Retrieve employee data.
VLOOKUP & ROWS or COLUMNS with Exact Match Lookup. ROWS or COLUMNS for Column Index Number. Goal: Retrieve reco
Multiple VLOOKUP functions. Goal: Calculate taxes from complex tax table.
How to use VLOOKUP, LEFT and SEARCH to do a "Partial Text Lookup. Goal: Lookup Product Price. Also: Look at Data Mismatch
INDEX and MATCH functions to do a "Lookup Left". INDEX array argument is a column. Goal: Given a flight range, lookup boom
INDEX and MATCH to find Vendor for Low Bid. INDEX array argument is a row. Goal: lookup vendor name for lowest bid.
INDEX and MATCH functions to do a Two-Way Lookup. INDEX array argument is a table. Goal: Do Two-Way Lookup to find Dis
INDEX and MATCH to lookup a whole column or row. INDEX array argument is a table. Goal: Lookup: 1) whole column of valu
How to use VLOOKUP & CHOOSE to do a lookup to multiple tables. Goal: Lookup Commission rate from Multiple Lookup table
LOOKUP with lookup_value and array arguments. Approximate Match. Goal: Lookup Commission and Rating.
LOOKUP with lookup_value and lookup_vector and result_vector arguments. Approximate Match. Goal: Lookup Last Date and
LOOKUP with lookup_value and lookup_vector and result_vector arguments. Approximate Match. Goal: "Lookup Adding" to t
INDEX and ROWS to Flip Grade Table. Goal: Flip a Grade Table.
Use MATCH to Compare Two Lists. Goal: Is an item in List 1 also in List 2?
Use MATCH to Compare Two Lists. Goal: Is an item in List 1 NOT in List 2?
Example 1: Data Validation List. VLOOKUP, Exact Match. IF & ISBLANK functions. Goal: Create Invoice.
Invoice Example:
Product Units Price Total
Carlota 5
Sunshine 2
Quad 10
Subtotal 0
Example 2: HLOOKUP with Exact Match Lookup. Goal: Lookup Tyrone's Phone Number. Horizontal Lookup is rare.
Employee: Chin
Phone:
Example 3: VLOOKUP with Approximate Match Lookup. Goal: Lookup Pipe size.
Example 4: VLOOKUP with Approximate Match Lookup. Goal: Lookup Commission Paid.
Example 5: VLOOKUP with Approximate Match Lookup. Cell Reference for Column Index Number. Goal: Get Rating and Comm
2 3
Employee Sales Rating Commission Paid
Sioux $7,598.00
Kim $68.00
Gigi $15,980.00
Franny $2,499.99
Example 6: VLOOKUP and MATCH functions with Exact Match Lookup. MATCH for Column Index Number. Goal: Retrieve emp
MATCH function is a lookup function.
MATCH function returns the relative position of an item in a list.
This method is dynamic: 1) columns can be in any order and 2) If you change input formula updates.
Example 7: VLOOKUP & ROWS or COLUMNS with Exact Match Lookup. ROWS or COLUMNS for Column Index Number. Goal: R
1) ROWS tells you how many rows. Expandable range. 2) COLUMNS tells you how many columns. Expandable range.
Great if you don't want to retype each column number and you can't have field names for MATCH.
ID ID
880-10002 880-10003
Example 8: Multiple VLOOKUP functions. Goal: Calculate taxes from complex tax table.
Tax Example:
Married
Taxable Earnings w
VLOOKUP
Example 9: How to use VLOOKUP, LEFT and SEARCH to do a "Partial Text Lookup. Goal: Lookup Product Price.
Use INDEX as a substitute for VLOOKUP when the value you want to return is to the
left of the lookup column.
Product Price Description
V Range $12.95 Flying Range is 10
Quad $39.95 Flying Range is 20
Weighted Sunset $40.00 Flying Range is 50
Weighted MB $45.00 Flying Range is 60
S Rang $65.00 Flying Range is 70
Long D $69.00 Flying Range is 80
Long D Squared $100.00 Flying Range is 85
Dan's Special $110.00 Flying Range is 110
Manu Magic $165.00 Flying Range is 160
Example 11: INDEX and MATCH to find Vendor for Low Bid. INDEX array argument is a row. Goal: lookup vendor name for low
Example 12: INDEX and MATCH functions to do a Two-Way Lookup. INDEX array argument is a table. Goal: Do Two-Way Look
2-Way lookup
Discount Table
PartID/Qty 1 5 25
Part1 13.00% 15.00% 17.00%
Part2 14.00% 16.00% 18.00%
Part3 15.00% 17.00% 19.00%
Part4 16.00% 18.00% 20.00%
Part5 17.00% 19.00% 21.00%
Part6 18.00% 20.00% 22.00%
Example 13: INDEX and MATCH to lookup a whole column or row. INDEX array argument is a table. Goal: Lookup: 1) whole c
Use INDEX, MATCH and SUM to retrieve a whole row of values and add them
0 (zero) or empty in column_num argument will return a whole row of values (“all columns” or “entire row”)
Month to add Mar Total
Mar
Jan 1 3 1
Feb 4 4 4
Mar 4 12 2
Apr 5 1 2
Example 14: How to use VLOOKUP & CHOOSE to do a lookup to multiple tables. Goal: Lookup Commission rate from Multiple
CHOOSE functions allows you to lookup things like different lookup tables.
=CHOOSE(index_num, value1,value2, …)
index_num is a number like 1, 2, 3, 4
value1 = lookup table 1
value2 = lookup table 2
value3 = lookup table 3
If index_num is 2, then the lookup table 2 will be returned by CHOOSE to the VLOOKUP function
Reference video:
CHOOSE Function Beginner to Advanced 12 Examples (Excel VLOOKUP WEEK Video #5)
http://www.youtube.com/watch?v=M4X2SXdXWmE
Example 16: LOOKUP with lookup_value and lookup_vector and result_vector arguments. Approximate Match. Goal: Lookup
Reason we use LOOKUP: LOOKUP can do Lookup Array Calculations without Ctrl + Shift + Enter:
Get Last Site based on Last
Date
Get Last Site based on Last
Date
okup is rare.
Tyrone Bobi
5/24/2010 2/2/2014
$89,589.00 $52,319.00
230 255
(253) 561-5768 (253) 598-1171
Phone
253-559-4034
253-553-4381
206-762-2195
253-764-6538
206-736-4510
253-452-9723
253-719-7600
ID Price ID Price
Bellen $26.00 234 $26.00
Carlota $23.00 345 $23.00
Quad $36.00 765 $36.00
oal: Given a flight range, lookup boomerang name in first column.
add them
s” or “entire column”)
When INDEX looks up a row or column, it returns a range of values, not an array. This is why we can
d them
mns” or “entire row”)
EDR
Units Sold Commission Rate
0 1.00%
200 2.00%
300 4.00%
400 6.00%
EDS
Units Sold Commission Rate
0 2.00%
300 3.00%
500 4.00%
750 5.00%
to retrieve (result_vector).
mmission and Rating.
Invoice Example:
Product Units Price Total
Carlota 5 28.95 144.75
Sunshine 2 18.95 37.9
Quad 10 35.95 359.5
Subtotal 542.15
Example 2: HLOOKUP with Exact Match Lookup. Goal: Lookup Tyrone's Phone Number. Horizontal Lookup is rare.
Employee: Chin
Phone: (206) 582-3391
Example 3: VLOOKUP with Approximate Match Lookup. Goal: Lookup Pipe size.
Example 4: VLOOKUP with Approximate Match Lookup. Goal: Lookup Commission Paid.
Example 5: VLOOKUP with Approximate Match Lookup. Cell Reference for Column Index Number. Goal: Get Rating and Comm
2 3
Employee Sales Rating Commission Paid
Sioux $7,598.00 Very Good 250
Kim $68.00 Sub Par 0
Gigi $15,980.00 Excellent 700
Franny $2,499.99 Par 20
Example 6: VLOOKUP and MATCH functions with Exact Match Lookup. MATCH for Column Index Number. Goal: Retrieve emp
MATCH function is a lookup function.
MATCH function returns the relative position of an item in a list.
This method is dynamic: 1) columns can be in any order and 2) If you change input formula updates.
3 2 4
ID First Last E-mail
880-10002 Kathrine Coller [email protected]
Example 7: VLOOKUP & ROWS or COLUMNS with Exact Match Lookup. ROWS or COLUMNS for Column Index Number. Goal: R
1) ROWS tells you how many rows. Expandable range. 2) COLUMNS tells you how many columns. Expandable range.
Great if you don't want to retype each column number and you can't have field names for MATCH.
ID ID
880-10002 880-10003 Stackpole
Coller
Kathrine
[email protected]
206-762-2195
Example 8: Multiple VLOOKUP functions. Goal: Calculate taxes from complex tax table.
Tax Example:
Married
Taxable Earnings w
VLOOKUP
$3,291.96 =VLOOKUP(B115,A107:E113,5)+ROUND
$3,291.96 =LOOKUP(B115,A107:E113)+ROUND((B
Example 9: How to use VLOOKUP, LEFT and SEARCH to do a "Partial Text Lookup. Goal: Lookup Product Price.
Use INDEX as a substitute for VLOOKUP when the value you want to return is to the
left of the lookup column.
Product Price Description
V Range $12.95 Flying Range is 10
Quad $39.95 Flying Range is 20
Weighted Sunset $40.00 Flying Range is 50
Weighted MB $45.00 Flying Range is 60
S Rang $65.00 Flying Range is 70
Long D $69.00 Flying Range is 80
Long D Squared $100.00 Flying Range is 85
Dan's Special $110.00 Flying Range is 110
Manu Magic $165.00 Flying Range is 160
Example 11: INDEX and MATCH to find Vendor for Low Bid. INDEX array argument is a row. Goal: lookup vendor name for low
Example 12: INDEX and MATCH functions to do a Two-Way Lookup. INDEX array argument is a table. Goal: Do Two-Way Look
2-Way lookup
Discount Table
PartID/Qty 1 5 25
Part1 13.00% 15.00% 17.00%
Part2 14.00% 16.00% 18.00%
Part3 15.00% 17.00% 19.00%
Part4 16.00% 18.00% 20.00%
Part5 17.00% 19.00% 21.00%
Part6 18.00% 20.00% 22.00%
Example 13: INDEX and MATCH to lookup a whole column or row. INDEX array argument is a table. Goal: Lookup: 1) whole c
Use INDEX, MATCH and SUM to retrieve a whole row of values and add them
0 (zero) or empty in column_num argument will return a whole row of values (“all columns” or “entire row”)
Month to add Mar Total
Mar 18
Jan 1 3 1
Feb 4 4 4
Mar 4 12 2
Apr 5 1 2
Example 14: How to use VLOOKUP & CHOOSE to do a lookup to multiple tables. Goal: Lookup Commission rate from Multiple
CHOOSE functions allows you to lookup things like different lookup tables.
=CHOOSE(index_num, value1,value2, …)
index_num is a number like 1, 2, 3, 4
value1 = lookup table 1
value2 = lookup table 2
value3 = lookup table 3
If index_num is 2, then the lookup table 2 will be returned by CHOOSE to the VLOOKUP function
Reference video:
CHOOSE Function Beginner to Advanced 12 Examples (Excel VLOOKUP WEEK Video #5)
http://www.youtube.com/watch?v=M4X2SXdXWmE
Example 16: LOOKUP with lookup_value and lookup_vector and result_vector arguments. Approximate Match. Goal: Lookup
Reason we use LOOKUP: LOOKUP can do Lookup Array Calculations without Ctrl + Shift + Enter:
Get Last Site based on Last
Date 3455 240th St., Des Monies
Get Last Site based on Last
Date 1254 10th St., Seattle
okup is rare.
Tyrone Bobi
5/24/2010 2/2/2014
$89,589.00 $52,319.00
230 255
(253) 561-5768 (253) 598-1171
Phone
253-559-4034
253-553-4381
206-762-2195
253-764-6538
206-736-4510
253-452-9723
253-719-7600
5,A107:E113,5)
5,A107:E113,4)
5,A107:E113,2)
(B119*B117,2)
5,A107:E113,5)+ROUND((B115-VLOOKUP(B115,A107:E113,2))*VLOOKUP(B115,A107:E113,4),2)
,A107:E113)+ROUND((B115-LOOKUP(B115,A107:B113))*LOOKUP(B115,A107:D113),2)
ID Price ID Price
Bellen $26.00 234 $26.00
Carlota $23.00 345 $23.00
Quad $36.00 765 $36.00
oal: Given a flight range, lookup boomerang name in first column.
=MATCH(B187,A180:A185,0)
=MATCH(B188,B179:E179) Technically there is a way to do it
185,C187,C188) 0.19
185,MATCH(B187,A180:A185,0),MATCH(B188,B179:E179))
add them
s” or “entire column”)
When INDEX looks up a row or column, it returns a range of values, not an array. This is why we can
d them
mns” or “entire row”)
EDR
Units Sold Commission Rate
0 1.00%
200 2.00%
300 4.00%
400 6.00%
EDS
Units Sold Commission Rate
0 2.00%
300 3.00%
500 4.00%
750 5.00%
to retrieve (result_vector).
mmission and Rating.
Data set with number of rolls of fence sold for each transaction: Pricing Table:
LOOKUP to get Price:
Number of Total Revenue Total Revenue Price per Roll
Date Rolls Price Revenue Helper Column Single Cell Formula Units From Units To (100 feet) 168
9/16/2015 540 0 143 $198.00 168
9/15/2015 360 144 288 $187.00 198
9/16/2015 12 289 577 $168.00 168
9/15/2015 468 578 and up $152.00 198
9/17/2015 48 198
9/18/2015 84 168
9/17/2015 540 168
9/18/2015 492 187
9/18/2015 204 168
9/15/2015 408 152
9/17/2015 780 168
9/16/2015 444 168
9/15/2015 432 168
9/16/2015 456 152
9/16/2015 768 168
9/17/2015 528 152
Data set with number of rolls of fence sold for each transaction: Pricing Table:
LOOKUP to get Price:
Number of Total Revenue Total Revenue Price per Roll
Date Rolls Price Revenue Helper Column Single Cell Formula Units From Units To (100 feet) 168
9/16/2015 540 $168.00 $90,720.00 $11,852,436.00 $11,852,436.00 0 143 $198.00 168
9/15/2015 360 $168.00 $60,480.00 144 288 $187.00 198
9/16/2015 12 $198.00 $2,376.00 289 577 $168.00 168
9/15/2015 468 $168.00 $78,624.00 578 and up $152.00 198
9/17/2015 48 $198.00 $9,504.00 198
9/18/2015 84 $198.00 $16,632.00 168
9/17/2015 540 $168.00 $90,720.00 168
9/18/2015 492 $168.00 $82,656.00 187
9/18/2015 204 $187.00 $38,148.00 168
9/15/2015 408 $168.00 $68,544.00 152
9/17/2015 780 $152.00 $118,560.00 168
9/16/2015 444 $168.00 $74,592.00 168
9/15/2015 432 $168.00 $72,576.00 168
9/16/2015 456 $168.00 $76,608.00 152
9/16/2015 768 $152.00 $116,736.00 168
9/17/2015 528 $168.00 $88,704.00 152
Grading example:
Student Class Score Decimal Grade
Susan 88.63%
Freddy 66.32%
Min 84.42%
Sheliadawn 97.89%
Ty 93.99%
Al 55.00%
This is how it must be for VLOOKUP (smallest to biggest): This is the way it would look in syllabus:
Percentage of Points
Earned Decimal Grade Percentage
94.00%
93.05%
92.10%
91.15%
90.20%
89.25%
88.30%
87.35%
86.40%
85.45%
84.50%
83.55%
82.60%
81.65%
80.70%
79.75%
78.80%
77.85%
76.90%
75.95%
75.00%
74.05%
73.10%
72.15%
71.20%
70.25%
69.30%
68.35%
67.40%
66.45%
65.50%
64.55%
63.60%
62.65%
0.00%
Decimal Grade
4
3.9
3.8
3.7
3.6
3.5
3.4
3.3
3.2
3.1
3
2.9
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2
1.9
1.8
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1
0.9
0.8
0.7
0
Example 18: INDEX and ROWS to Flip Grade Table. Goal: Flip a Grade Table.
Grading example:
Student Class Score Decimal Grade
Susan 88.63% 3.4
Freddy 66.32% 1
Min 84.42% 2.9
Sheliadawn 97.89% 4
Ty 93.99% 3.9
Al 55.00% 0
This is how it must be for VLOOKUP (smallest to biggest): This is the way it would look in syllabus:
Percentage of Points
Earned Decimal Grade Percentage
0 0 94.00%
0.6265 0.7 93.05%
0.636 0.8 92.10%
0.6455 0.9 91.15%
0.655 1 90.20%
0.6645 1.1 89.25%
0.674 1.2 88.30%
0.6835 1.3 87.35%
0.693 1.4 86.40%
0.7025 1.5 85.45%
0.712 1.6 84.50%
0.7215 1.7 83.55%
0.731 1.8 82.60%
0.7405 1.9 81.65%
0.75 2 80.70%
0.7595 2.1 79.75%
0.769 2.2 78.80%
0.7785 2.3 77.85%
0.788 2.4 76.90%
0.7975 2.5 75.95%
0.807 2.6 75.00%
0.8165 2.7 74.05%
0.826 2.8 73.10%
0.8355 2.9 72.15%
0.845 3 71.20%
0.8545 3.1 70.25%
0.864 3.2 69.30%
0.8735 3.3 68.35%
0.883 3.4 67.40%
0.8925 3.5 66.45%
0.902 3.6 65.50%
0.9115 3.7 64.55%
0.921 3.8 63.60%
0.9305 3.9 62.65%
0.94 4 0.00%
Decimal Grade
4
3.9
3.8
3.7
3.6
3.5
3.4
3.3
3.2
3.1
3
2.9
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2
1.9
1.8
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1
0.9
0.8
0.7
0
Example 19: Use MATCH to Compare Two Lists. Goal: Is an item in List 1 also in List 2?
Notes:
MATCH: reports relative position of item in a list
F4 key adds $ signs to lock range (make absolute).
ISNUMBER: reports TRUE when it sees a number
2 3 4 5
Employee ID FirstName LastName HireDate Salary
JWSO-6243-0009 FirstName9 LastName10 3/9/2003 $58,644.00
InStore Category
RAD-1084
SPORT-1876
OUTDOOR-1570
Use INDEX / MATCH as a substitute for VLOOKUP when
the value you want to return is to the left of the lookup Customer Asks For a Boomerang That Flies A Certain Ra
column. G3 create a formula that will retrieve the Product na
Product Price Description Description
Carlota $23.00 Flying Range is 20 Flying Range is 15
Quad $30.00 Flying Range is 15
Bellen $22.00 Flying Range is 25
Sunshine $25.00 Flying Range is 30
Majestic
Beaut $23.50 Flying Range is 40
Phenolic
Sunshine $45.00 Flying Range is 60
a Boomerang That Flies A Certain Range. In cell F3 and
mula that will retrieve the Product name and Price.
Product Price
Use INDEX / MATCH as a substitute for VLOOKUP when
the value you want to return is to the left of the lookup Customer Asks For a Boomerang That Flies A Certain Ran
column. create a formula that will retrieve the Product nam
Product Price Description Description
Carlota $23.00 Flying Range is 20 Flying Range is 15
Quad $30.00 Flying Range is 15
Bellen $22.00 Flying Range is 25
Sunshine $25.00 Flying Range is 30
Majestic
Beaut $23.50 Flying Range is 40
Phenolic
Sunshine $45.00 Flying Range is 60
oomerang That Flies A Certain Range. In cell F3 and G3
a that will retrieve the Product name and Price.
Product Price
Quad $30.00
The commissions must be determined in column F. ProductLine1 must use the table in the range H4:I7 and ProductLine2 mu
K4:L7 . Don't use CHOOSE for this one - because there are two different types of commission calculations, use someth
ProductLine2:
ProductLine1: Straight Commission Rate times
Dollar Commission the Sales Amount.
Product1 $100.00 Product5 0.02
Product2 $150.00 Product6 0.03
Product3 $125.00 Product7 0.025
Product4 $110.00 Product8 0.0275
The commissions must be determined in column F. ProductLine1 must use the table in the range H4:I7 and ProductLine2 mu
K4:L7 . Don't use CHOOSE for this one - because there are two different types of commission calculations, use someth
ProductLine2:
ProductLine1: Straight Commission Rate times
Dollar Commission the Sales Amount.
Product1 $100.00 Product5 0.02
Product2 $150.00 Product6 0.03
Product3 $125.00 Product7 0.025
Product4 $110.00 Product8 0.0275
The commissions must be determined in column F. ProductLine1 must use the table in the
range H4:I7 and ProductLine2 must use the table in the range K4:L7 .
Month Feb
Total
Month Feb
Total $702,351.00