Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 21

1 VLOOKUP = V = Vertical

2 Why so common? Because everyone needs to look stuff up


3 VLOOKUP Delivers a value to a cell: Extract Match
4 VLOOKUP #N/A and IFERROR or IF
5 VLOOKUP and Data Validation
6 VLOOKUP as Formula Element
7 VLOOKUP with Named Range
8 HLOOKUP = H = Horizontal
9 VLOOKUP Delivers a value to a cell: Approximate Match
10 VLOOKUP with table on different sheet
11 VLOOKUP with table in different workbook
12 Show Full Record: Numbers above column header
13 Show Full Record: COLUMNS Function
14 Show Full Record: ROWS Function
15 Show Full Record: MATCH Functions
16 Two Lookup Values: Add join column as first column in table
17 Two Lookup Values: Join columns in formula and use CHOOSE function
18 Partial Text Lookup: LEFT and SEARCH Functions
19 Partial Text Lookup: MID Function
20 Partial Text Lookup: RIGHT Function
21 TRIM and VLOOKUP: Space in lookup value
22 TRIM and VLOOKUP: Space in 1st column of table
23 VLOOKUP with 3 lookup tables: CHOOSE Function
24 VLOOKUP: Two Way Lookup with VLOOKUP and MATCH
25 VLOOKUP: Variable Tax Rate, 3 VLOOKUPS in one formula
VLOOKUP
V = Vertical
HLOOKUP
H = Horizontal

Why so common? Because everyone needs to look stuff up

Invoices
Boomerang Part Number Flight Range (meters) Price
Bellen 1000-165-B100 25 $26.95
Carlota 1001-540-C101 20 $28.95
Majestic Beaut 1002-394-M102 35 $31.95
Quad 1003-307-Q103 20 $35.95
Sunshine 1004-848-S104 30 $18.95
Sunset 1005-155-S105 40 $20.95
Tri-Fly 1006-552-T106 1 $4.95
Outdoor Tri-Fly 1007-634-O107 5 $8.95

Invoices
Part Number 1000-165-B100 1001-540-C101 1002-394-M102
Description Bellen Carlota Majestic Beaut
Flight Range (meters) 25 20 35
Price $26.95 $28.95 $31.95

Commission
Sales Amount Category Commission Paid
$0.00 Sub Par $0.00
$1,000.00 Par $20.00
$2,500.00 Above Par $100.00
$7,000.00 Very Good $250.00
$10,000.00 Excellent $700.00

Tax
Table 1 - Monthly Payroll Period - Percentage Method of Withholding
Married
Tax from Previous
Over -- But not over -- Rate brackets
$0 $1,313 0% $0.00
$1,313 $2,038 10% $0.00
$2,038 $6,304 15% $72.50
$6,304 $9,844 25% $712.40
$9,844 $18,050 28% $1,597.40
$18,050 $31,725 33% $3,895.08
$31,725 35% $8,407.83

Human Resources
ID Last First E-mail
880-10000 Leff Julianne LeffJ@PBY.com
880-10001 Piano Milagros PianoM@PBY.com
880-10002 Coller Kathrine CollerK@PBY.com
880-10003 Stackpole Lonnie StackpoleL@PBY.com
880-10004 Lintz Kurt LintzK@PBY.com
880-10005 Dudgeon Penelope DudgeonP@PBY.com
880-10006 Hughs Pearlie HughsP@PBY.com
1003-307-Q103 1004-848-S104 1005-155-S105 1006-552-T106 1007-634-O107
Quad Sunshine Sunset Tri-Fly Outdoor Tri=Fly
20 30 40 1 5
$35.95 $18.95 $20.95 $4.95 $8.95
Rule
Zero Tax
10% of excess over $1,313
$72.50 + 15% of excess over $2,038
$712.40 + 25% of excess over $6,304
$1,597.40 + 28% of excess over $9,844
$3,895.08 + 33% of excess over $18,050
$8,407.83 + 35% of excess over $31,725

Phone
253-559-4034
253-553-4381
206-762-2195
253-764-6538
206-736-4510
253-452-9723
253-719-7600
VLOOKUP Delivers a value to a cell
Exact Match

Boomerang Part Number Flight Range (meters) Price


Bellen 1000-165-B100 25 $26.95
Carlota 1001-540-C101 20 $28.95
Majestic Beaut 1002-394-M102 35 $31.95
Quad 1003-307-Q103 20 $35.95
Sunshine 1004-848-S104 30 $18.95
Sunset 1005-155-S105 40 $20.95
Tri-Fly 1006-552-T106 1 $4.95
Outdoor Tri-Fly 1007-634-O107 5 $8.95

Boomerang Price Units Total


Bellen 26.95 3 80.85

VLOOKUP #N/A and IFERROR or IF


Boomerang Price Units Total
Belen Incorrect Boomerang Name 3
Incorrect Boomerang Name
VLOOKUP and Data Validation
Boomerang Price Units Total
Carlota 28.95 3

VLOOKUP with Named Range


Boomerang Price Units Total
Majestic Beaut 31.95 3 95.85

VLOOKUP as Formula Element


Boomerang Units Total
Majestic Beaut 3 95.85

HLOOKUP
H = Horizontal

Description Bellen Carlota Majestic Beaut


Part Number 1000-165-B100 1001-540-C101 1002-394-M102
Flight Range (meters) 25 20 35
Price $26.95 $28.95 $31.95

Boomerang Price
Carlota 28.95
1st column is where VLOOKUP "looks" to figure out what row in the table has the value it w
Tell VLOOKUP what value it should look up = 1st argument
Tell VLOOKUP where the table is = 2nd argument
Notes ==> Tell VLOOKUP what column holds the value you want to return to the cell = 3rd argument
Tell VLOOKUP whether you are doing exact ( 0 ) or approximate (leave argument blank) ma

Product
Alt, D, L = Data Validation Carlota
Sunshine
Majestic Beaut

Name Box = left side of formula bar


Ctrl + F3 = Name Manager

Quad Sunshine Sunset Tri-Fly Outdoor Tri=Fly


1003-307-Q103 1004-848-S104 1005-155-S105 1006-552-T106 1007-634-O107
20 30 40 1 5
$35.95 $18.95 $20.95 $4.95 $8.95
w in the table has the value it wants

urn to the cell = 3rd argument


mate (leave argument blank) match = 4th argument

Units Price Total


5 28.95
2 18.95
3 31.95
VLOOKUP Delivers a value to a cell
Approximate Match

How VLOOKUP "sees" it Sales Amount Category Commission Paid


$0 <= Sales < $1,000 $0.00 Sub Par $0.00
$1,000 <= Sales < $2,500 $1,000.00 Par $20.00
$2,500 <= Sales < $7,000 $2,500.00 Above Par $100.00
$7,000 <= Sales < $10,000 $7,000.00 Very Good $250.00
$10,000 >= Sales $10,000.00 Excellent $700.00

Less than 1st value in table LOOKUP says: #N/A


1st column must be sorted biggest to smallest
leave 4th argument blank (default behavior)

Your Sales Commission


$150,000.00 700
VLOOKUP with table on different sheet
Your Sales Commission
$11,000.00 $700.00

VLOOKUP with table in different workbook


Your Sales Commission
$7,500.00 =VLOOKUP(A7,'FilePath[CTable.xlsx]Table'!$A$2:$C$6,3)
Sales Amount Category Commission Paid
$0.00 Sub Par $0.00
$1,000.00 Par $20.00
$2,500.00 Above Par $100.00
$7,000.00 Very Good $250.00
$10,000.00 Excellent $700.00
Show Full Record: 4 methods

ID Last First E-mail


880-10061 Leff Julianne LeffJ@PBY.com
880-10060 Piano Milagros PianoM@PBY.com
880-10059 Coller Kathrine CollerK@PBY.com
880-10058 Stackpole Lonnie StackpoleL@PBY.com
880-10057 Lintz Kurt LintzK@PBY.com
880-10056 Dudgeon Penelope DudgeonP@PBY.com
880-10055 Hughs Pearlie HughsP@PBY.com

Numbers above column header 2 3 4


ID Last First E-mail
880-10060 Piano Milagros PianoM@PBY.com

COLUMNS tells you how many columns. Expandable range.


ID Last First E-mail
880-10058 Stackpole Lonnie StackpoleL@PBY.com

ROWS tells you how many rows. Expandable range.


ID 880-10060
Last Piano
First Milagros
E-mail PianoM@PBY.com
Phone 253-553-4381

MATCH Functions tells you the relative position of an item


ID Last First E-mail
880-10055 Hughs Pearlie HughsP@PBY.com
Phone
253-559-4034
253-553-4381
206-762-2195
253-764-6538
206-736-4510
253-452-9723
253-719-7600

5
Phone
253-553-4381

Phone
253-764-6538

Phone
253-719-7600
Two Lookup Values: 2 methods

SalesRep State ID
Joe CA JA5688589 Add join column as first column in table
Joe OR JR4777905 Join columns in formula and use CHOOSE function
Array Formula = Ctrl + Shift + Enter

Join SalesRep State ID


Joe|WA Joe WA JA5239658
Joe|OR Joe OR JR4777905
Joe|CA Joe CA JA5688589
Sioux|AZ Sioux AZ SZ9891014
Sioux|NM Sioux NM SM7283236
Sioux|TX Sioux TX SX1797048
Chin|AL Chin AL CL3782691
Chin|AK Chin AK CK5456468
Partial Text Lookup: LEFT and SEARCH
ID Price ID Price
Bellen-234-B25R $26.00 Bellen $26.00
Carlota-345-C20R $23.00 Carlota $23.00
Quad-765-Q20L $36.00 Quad $36.00

Partial Text Lookup: MID


ID Price ID Price
Bellen-234-B25R $26.00 234 $26.00
Carlota-345-C20R $23.00 345 $23.00
Quad-765-Q20L $36.00 765 $36.00

Partial Text Lookup: RIGHT


ID Price ID Price
Bellen-234-B25R $26.00 B25R $26.00
Carlota-345-C20R $23.00 C20R $23.00
Quad-765-Q20L $36.00 Q20L $36.00
TRIM and VLOOKUP: 2 examples

Boomerang Part Number Flight Range (meters) Price


Bellen 1000-165-B100 25 $26.95
Carlota 1001-540-C101 20 $28.95
Majestic Beaut 1002-394-M102 35 $31.95
Quad 1003-307-Q103 20 $35.95
Sunshine 1004-848-S104 30 $18.95
Sunset 1005-155-S105 40 $20.95
Tri-Fly 1006-552-T106 1 $4.95
Outdoor Tri-Fly 1007-634-O107 5 $8.95

Space in lookup value


Boomerang Price
Majestic Beaut 31.95
Quad 35.95
Sunshine 18.95
Sunset 20.95
Tri-Fly 4.95

Boomerang Part Number Flight Range (meters) Price


Bellen 1000-165-B100 25 $26.95
Carlota 1001-540-C101 20 $28.95
Majestic Beaut 1002-394-M102 35 $31.95
Quad 1003-307-Q103 20 $35.95
Sunshine 1004-848-S104 30 $18.95
Sunset 1005-155-S105 40 $20.95
Tri-Fly 1006-552-T106 1 $4.95
Outdoor Tri-Fly 1007-634-O107 5 $8.95

Space in 1st column of table


Boomerang Price
Majestic Beaut 31.95 Array Formula = Ctrl + Shift + Enter
Quad 35.95
Sunshine 18.95
Sunset 20.95
Tri-Fly 4.95
VLOOKUP with 3 lookup tables
ABC
Product Units Sold Commission Rate Units Sold Commission Rate
ABC 431 4.00% 0 1.00%
EDR 65 1.00% 100 2.00%
EDS 563 4.00% 200 4.00%
ABC 493 4.00% 500 6.00%
EDS 188 2.00%
EDR
Units Sold Commission Rate
ABC 1 0 1.00%
EDR 2 200 2.00%
EDS 3 300 4.00%
400 6.00%

EDS
Units Sold Commission Rate
0 2.00%
300 3.00%
500 4.00%
750 5.00%
VLOOKUP: Two Way Lookup

Income 1900
Allowance 3
Tax $6.00

Income/Allowances 0 1 2 3 4
0 $0.00 $1.00 $2.00 $3.00 $4.00
100 $1.00 $2.00 $3.00 $4.00 $5.00
500 $2.00 $3.00 $4.00 $5.00 $6.00
1000 $3.00 $4.00 $5.00 $6.00 $7.00
2000 $4.00 $5.00 $6.00 $7.00 $8.00
VLOOKUP: Variable Tax

Tax from
But not Previous
Lookup Value Over -- over -- Rate brackets
$0 $0 $1,313 0% $0.00
$1,313.01 $1,313 $2,038 10% $0.00
$2,038.01 $2,038 $6,304 15% $72.50
$6,304.01 $6,304 $9,844 25% $712.40
$9,844.01 $9,844 $18,050 28% $1,597.40
$18,050.01 $18,050 $31,725 33% $3,895.08
$31,725.01 $31,725 35% $8,407.83

Taxable Earnings $2,500.00


Tax $141.80
($238.60)

$141.80
Rule
Zero Tax
10% of excess over $1,313
$72.50 + 15% of excess over $2,038
$712.40 + 25% of excess over $6,304
$1,597.40 + 28% of excess over $9,844
$3,895.08 + 33% of excess over $18,050
$8,407.83 + 35% of excess over $31,725
Product Price Product Price
Bellen $25.00 MB 35
Carlota $26.00
Quad $36.00
MB $35.00

You might also like