VLOOKUP SHARK WEEK DoawnloadableWorkbook01 Start

Post on 31-Dec-2015

89 views 9 download

description

vlookup

transcript

1 VLOOKUP = V = Vertical2 Why so common? Because everyone needs to look stuff up3 VLOOKUP Delivers a value to a cell: Extract Match4 VLOOKUP #N/A and IFERROR or IF5 VLOOKUP and Data Validation6 VLOOKUP as Formula Element7 VLOOKUP with Named Range8 HLOOKUP = H = Horizontal9 VLOOKUP Delivers a value to a cell: Approximate Match

10 VLOOKUP with table on different sheet11 VLOOKUP with table in different workbook12 Show Full Record: Numbers above column header13 Show Full Record: COLUMNS Function14 Show Full Record: ROWS Function15 Show Full Record: MATCH Functions16 Two Lookup Values: Add join column as first column in table17 Two Lookup Values: Join columns in formula and use CHOOSE function18 Partial Text Lookup: LEFT and SEARCH Functions19 Partial Text Lookup: MID Function20 Partial Text Lookup: RIGHT Function21 TRIM and VLOOKUP: Space in lookup value22 TRIM and VLOOKUP: Space in 1st column of table23 VLOOKUP with 3 lookup tables: CHOOSE Function24 VLOOKUP: Two Way Lookup with VLOOKUP and MATCH25 VLOOKUP: Variable Tax Rate, 3 VLOOKUPS in one formula26 VLOOKUP: Dynamic Ranges with Table feature

VLOOKUPV = VerticalHLOOKUPH = Horizontal

Why so common? Because everyone needs to look stuff up

InvoicesBoomerang Part Number Flight Range (meters) PriceBellen 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

InvoicesPart Number 1000-165-B100 1001-540-C101 1002-394-M102Description Bellen Carlota Majestic BeautFlight Range (meters) 25 20 35Price $26.95 $28.95 $31.95

CommissionSales 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 WithholdingMarried

Over -- But not over -- RateTax from Previous 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 ResourcesID Last First E-mail880-10000 Leff Julianne LeffJ@PBY.com880-10001 Piano Milagros PianoM@PBY.com880-10002 Coller Kathrine CollerK@PBY.com880-10003 Stackpole Lonnie StackpoleL@PBY.com880-10004 Lintz Kurt LintzK@PBY.com880-10005 Dudgeon Penelope DudgeonP@PBY.com880-10006 Hughs Pearlie HughsP@PBY.com

1003-307-Q103 1004-848-S104 1005-155-S105 1006-552-T106Quad Sunshine Sunset Tri-Fly

20 30 40 1$35.95 $18.95 $20.95 $4.95

Rule

Zero Tax10% 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

Phone253-559-4034253-553-4381206-762-2195253-764-6538206-736-4510253-452-9723253-719-7600

1007-634-O107Outdoor Tri=Fly

5$8.95

VLOOKUP Delivers a value to a cellExact Match

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

Boomerang Price Units3

VLOOKUP #N/A and IFERROR or IFBoomerang Price Units

3

VLOOKUP and Data ValidationBoomerang Price Units

3

VLOOKUP with Named RangeBoomerang Price Units

3

VLOOKUP as Formula ElementBoomerang Units Total

3

HLOOKUPH = Horizontal

Description Bellen CarlotaPart Number 1000-165-B100 1001-540-C101Flight Range (meters) 25 20Price $26.95 $28.95

Boomerang PriceCarlota

Price$26.95 $28.95 $31.95 $35.95 $18.95 $20.95

$4.95 $8.95

Total 1st column is where VLOOKUP "looks" to figure out what row in the table has the value it wantsTell VLOOKUP what value it should look up = 1st argumentTell VLOOKUP where the table is = 2nd argument

Notes ==> Tell VLOOKUP what column holds the value you want to return to the cell = 3rd argumentTell VLOOKUP whether you are doing exact ( 0 ) or approximate (leave argument blank) match = 4th argument

Total

TotalAlt, D, L = Data Validation

TotalName Box = left side of formula barCtrl + F3 = Name Manager

Majestic Beaut Quad Sunshine Sunset Tri-Fly1002-394-M102 1003-307-Q103 1004-848-S104 1005-155-S105 1006-552-T106

35 20 30 40 1$31.95 $35.95 $18.95 $20.95 $4.95

1st column is where VLOOKUP "looks" to figure out what row in the table has the value it wantsTell VLOOKUP what value it should look up = 1st argumentTell VLOOKUP where the table is = 2nd argumentTell VLOOKUP what column holds the value you want to return to the cell = 3rd argumentTell VLOOKUP whether you are doing exact ( 0 ) or approximate (leave argument blank) match = 4th argument

Product Units Price TotalCarlota 5 28.95Sunshine 2 18.95Majestic Beaut 3 31.95

Name Box = left side of formula bar

Outdoor Tri=Fly1007-634-O107

5$8.95

VLOOKUP Delivers a value to a cellApproximate 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/A1st column must be sorted biggest to smallestleave 4th argument blank (default behavior)

Your Sales Commission

VLOOKUP with table on different sheetYour Sales Commission

$11,000.00

VLOOKUP with table in different workbookYour Sales Commission

$7,500.00

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-mail880-10061 Leff Julianne LeffJ@PBY.com880-10060 Piano Milagros PianoM@PBY.com880-10059 Coller Kathrine CollerK@PBY.com880-10058 Stackpole Lonnie StackpoleL@PBY.com880-10057 Lintz Kurt LintzK@PBY.com880-10056 Dudgeon Penelope DudgeonP@PBY.com880-10055 Hughs Pearlie HughsP@PBY.com

Numbers above column headerID Last First E-mail

COLUMNS tells you how many columns. Expandable range.ID Last First E-mail

ROWS tells you how many rows. Expandable range.IDLastFirstE-mailPhone

MATCH Functions tells you the relative position of an itemID Last First E-mail

Phone253-559-4034253-553-4381206-762-2195253-764-6538206-736-4510253-452-9723253-719-7600

Phone

Phone

Phone

Two Lookup Values: 2 methods

SalesRep State IDJoe CA Add join column as first column in tableJoe OR Join columns in formula and use CHOOSE function

Array Formula = Ctrl + Shift + Enter

Join SalesRep State IDJoe WA JA5239658Joe OR JR4777905Joe CA JA5688589Sioux AZ SZ9891014Sioux NM SM7283236Sioux TX SX1797048Chin AL CL3782691Chin AK CK5456468

Partial Text Lookup: LEFT and SEARCHID Price ID PriceBellen-234-B25R Bellen $26.00 Carlota-345-C20R Carlota $23.00 Quad-765-Q20L Quad $36.00

Partial Text Lookup: MIDID Price ID PriceBellen-234-B25R 234 $26.00 Carlota-345-C20R 345 $23.00 Quad-765-Q20L 765 $36.00

Partial Text Lookup: RIGHTID Price ID PriceBellen-234-B25R B25R $26.00 Carlota-345-C20R C20R $23.00 Quad-765-Q20L Q20L $36.00

TRIM and VLOOKUP: 2 examples

Boomerang Part Number Flight Range (meters) PriceBellen 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 valueBoomerang PriceMajestic Beaut Quad Sunshine Sunset Tri-Fly

Boomerang Part Number Flight Range (meters) PriceBellen 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 tableBoomerang PriceMajestic Beaut Array Formula = Ctrl + Shift + EnterQuadSunshineSunsetTri-Fly

VLOOKUP with 3 lookup tablesABC

Product Units Sold Commission Rate Units Sold Commission RateABC 431 0 1.00%EDR 65 100 2.00%EDS 563 200 4.00%ABC 493 500 6.00%EDS 188

EDRUnits Sold Commission Rate

ABC 1 0 1.00%EDR 2 200 2.00%EDS 3 300 4.00%

400 6.00%

EDSUnits Sold Commission Rate

0 2.00%300 3.00%500 4.00%750 5.00%

VLOOKUP: Two Way Lookup

Income 1900Allowance 3Tax

Income/Allowances 0 1 2 3 40 $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

Lookup Value Over -- Rate$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

But not over --

Tax from Previous brackets

RuleZero Tax10% 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 PriceBellen $25.00 Carlota $26.00