0% found this document useful (0 votes)
129 views17 pages

VLOOKUP and XLOOKUP Inventory Guide

The document discusses using VLOOKUP and XLOOKUP formulas to lookup product names from an inventory table using product IDs. It shows examples of VLOOKUP formulas with hardcoded ranges and describes how XLOOKUP can perform lookups more flexibly. It also notes that predefined ranges in VLOOKUP formulas may not dynamically update when new products are added.

Uploaded by

Durgaprasad Goka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views17 pages

VLOOKUP and XLOOKUP Inventory Guide

The document discusses using VLOOKUP and XLOOKUP formulas to lookup product names from an inventory table using product IDs. It shows examples of VLOOKUP formulas with hardcoded ranges and describes how XLOOKUP can perform lookups more flexibly. It also notes that predefined ranges in VLOOKUP formulas may not dynamically update when new products are added.

Uploaded by

Durgaprasad Goka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Anders

Created Date Created by:


08-05-2020 Serdar
Data source: Microsoft AdventureWorks

VLOOKUP RANGE -1-


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID Name ProductNumber SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 Adjustable Race AR-5381 1000 750
1 Adjustable Race 6 B 5 324 2 Bearing Ball BA-8327 1000 750
1 Adjustable Race 50 A 5 353 3 BB Ball Bearing BE-2349 800 600
2 Bearing Ball 1 A 2 427 4 Headset Ball Bearings BE-2908 800 600
2 Bearing Ball 6 B 1 318
2 Bearing Ball 50 A 6 364 This is generic VLOOKUP formula with hardcoded numbers.
3 BB Ball Bearing 1 A 7 585 We use ranges in this example.
3 BB Ball Bearing 6 B 9 443
3 BB Ball Bearing 50 A 10 324
4 Headset Ball Bearings 1 A 6 512
4 Headset Ball Bearings 6 B 10 422
4 Headset Ball Bearings 50 A 11 388

Formula =VLOOKUP($B20;$I$9:$M$12;2;FALSE)
Anders
Created Date Created by:
08-05-2020 Serdar

Data source: Microsoft AdventureWorks

ALT 1: XLOOKUP
Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443 XLOOKUP is our top alternative to VLOOKUP. It is simple,
3 BB Ball Bearing 50 A 10 324 powerful, can do error handling, and do exact matching. All in 1
4 Headset Ball Bearings 1 A 6 512 formula!
4 Headset Ball Bearings 6 B 10 422
4 Headset Ball Bearings 50 A 11 388
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula: =XLOOKUP([@ProductID];LookupTable3[ProductID];LookupTable3[Name];"")
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

VLOOKUP RANGE -2-


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID Name ProductNumber SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 Adjustable Race AR-5381 1000 750
1 Adjustable Race 6 B 5 324 2 Bearing Ball BA-8327 1000 750
1 Adjustable Race 50 A 5 353 3 BB Ball Bearing BE-2349 800 600
2 Bearing Ball 1 A 2 427 4 Headset Ball Bearings BE-2908 800 600
2 Bearing Ball 6 B 1 318 316 Blade BL-2036 800 600
2 Bearing Ball 50 A 6 364 317 LL Crankarm CA-5965 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
3 BB Ball Bearing 50 A 10 324 In this example, we add two new products: 316 and 317.
Since we defined our ranges already, we won't be able to
4 Headset Ball Bearings 1 A 6 512
capture changes in ProductID without changing the actual
4 Headset Ball Bearings 6 B 10 422
lookup range formulas in the Inventory table.
4 Headset Ball Bearings 50 A 11 388
316 #N/A 5 A 11 532
316 #N/A 10 B 1 388
316 #N/A 50 B 8 441
317 #N/A 1 C 1 283
317 #N/A 5 A 1 158
317 #N/A 50 A 21 152

Formula: =VLOOKUP($B26;$I$9:$M$12;2;FALSE)
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

VLOOKUP TABLE
Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443 In this example, we created our basic VLOOKUP formula using
3 BB Ball Bearing 50 A 10 324 tables. It is recommended that you use tables over ranges to
4 Headset Ball Bearings 1 A 6 512 mitigate of selecting missing ranges in the formulas.
4 Headset Ball Bearings 6 B 10 422 Moreover, formulas including table referances are easier to
4 Headset Ball Bearings 50 A 11 388 read.
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula =VLOOKUP([@ProductID];Lookup_Table;3;FALSE)
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

VLOOKUP DYNAMIC
Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID Name ProductNumber SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 Adjustable Race AR-5381 1000 750
1 Adjustable Race 6 B 5 324 2 Bearing Ball BA-8327 1000 750
1 Adjustable Race 50 A 5 353 3 BB Ball Bearing BE-2349 800 600
2 Bearing Ball 1 A 2 427 4 Headset Ball Bearings BE-2908 800 600
2 Bearing Ball 6 B 1 318 316 Blade BL-2036 800 600
2 Bearing Ball 50 A 6 364 317 LL Crankarm CA-5965 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443 In this example, we created our basic VLOOKUP formula using
3 BB Ball Bearing 50 A 10 324 tables. It is recommended that you use tables over ranges to
4 Headset Ball Bearings 1 A 6 512 mitigate of selecting missing ranges in the formulas. Moreover,
4 Headset Ball Bearings 6 B 10 422 formulas including table referances are easier to read.
4 Headset Ball Bearings 50 A 11 388
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula: =VLOOKUP([@ProductID];LookupTable1;COLUMN(LookupTable1[[#Headers];[Name]])-COLUMN(LookupTable1[[#Headers];[ProductID]])+1;FALSE)
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

VLOOKUP DYNAMIC WITH ERROR


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductNumber Name ProductID SafetyStockLevel ReorderPoint
1 #N/A 1 A 1 408 AR-5381 Adjustable Race 1 1000 750
1 #N/A 6 B 5 324 BA-8327 Bearing Ball 2 1000 750
1 #N/A 50 A 5 353 BE-2349 BB Ball Bearing 3 800 600
2 #N/A 1 A 2 427 BE-2908 Headset Ball Bearings 4 800 600
2 #N/A 6 B 1 318 BL-2036 Blade 316 800 600
2 #N/A 50 A 6 364 CA-5965 LL Crankarm 317 500 375
3 #N/A 1 A 7 585
3 #N/A 6 B 9 443 In this example, we created our basic VLOOKUP formula using
3 #N/A 50 A 10 324 tables. It is recommended that you use tables over ranges to
4 #N/A 1 A 6 512 mitigate of selecting missing ranges in the formulas. Moreover,
4 #N/A 6 B 10 422 formulas including table referances are easier to read.
4 #N/A 50 A 11 388
316 #N/A 5 A 11 532
316 #N/A 10 B 1 388
316 #N/A 50 B 8 441
317 #N/A 1 C 1 283
317 #N/A 5 A 1 158
317 #N/A 50 A 21 152

Formula: =VLOOKUP([@ProductID];LookupTable2;COLUMN(LookupTable2[[#Headers];[Name]])-COLUMN(LookupTable2[[#Headers];[ProductID]])+1;FALSE)
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

XLOOKUP WITH SUM


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
3 BB Ball Bearing 50 A 10 324
4 Headset Ball Bearings 1 A 6 512
4 Headset Ball Bearings 6 B 10 422 Product ID starts Product ID ends Total Quantity
4 Headset Ball Bearings 50 A 11 388 1 316 6.229
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441 This is an interesting one! You can use XLOOKUP to create and
317 LL Crankarm 1 C 1 283 define range start and end points while nesting the formula inside
317 LL Crankarm 5 A 1 158 another one such as SUM, AVERAGE, MEAN
317 LL Crankarm 50 A 21 152

Formula: =XLOOKUP([@ProductID];LookupTable4[ProductID];LookupTable4[Name];"")
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

ALT 2: NESTED XLOOKUP


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
You can replace INDEX MATCH with NESTED XLOOKUPs. You don't
3 BB Ball Bearing 50 A 10 324 need additional error handling formulas when you use NESTED
4 Headset Ball Bearings 1 A 6 512 XLOOKUPs. With INDEX MATCH, you need to use error handling
4 Headset Ball Bearings 6 B 10 422 formulas, such as IFERROR, IFNA...
4 Headset Ball Bearings 50 A 11 388
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula: =XLOOKUP(C$8;LookupTable5[#Headers];XLOOKUP($B26;LookupTable5[ProductID];LookupTable5))
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

ALT3: INDEX-MATCH
Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
INDEX MATCH is our second best choice to replace VLOOKUP.
3 BB Ball Bearing 50 A 10 324
Particularly, it is very useful for users with no Office365 subscription.
4 Headset Ball Bearings 1 A 6 512
4 Headset Ball Bearings 6 B 10 422
4 Headset Ball Bearings 50 A 11 388
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula: =INDEX(LookupTable6;MATCH([@ProductID];LookupTable6[ProductID];0);MATCH(B$8;LookupTable6[#Headers];0))
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

ALT 4: LOOKUP
Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
3 BB Ball Bearing 50 A 10 324 LOOKUP formula is another alternative to VLOOKUP! However, you
4 Headset Ball Bearings 1 A 6 512 can't do an exact match with LOOKUP. Thus, you may want to
4 Headset Ball Bearings 6 B 10 422 avoid using it as a replacement of VLOOKUP inc ase your data is not
4 Headset Ball Bearings 50 A 11 388 in the right order.
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula: =LOOKUP([@ProductID];LookupTable7[ProductID];LookupTable7[Name])
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

ALT 5: LOOKUP-2
Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
3 BB Ball Bearing 50 A 10 324 Using LOOKUP(2,1/...) is another method to VLOOKUP. However,
4 Headset Ball Bearings 1 A 6 512 this still doesn't resolve the approximation issue. LOOKUP is a great
4 Headset Ball Bearings 6 B 10 422 formula to use in approximations but not as much useful to use for
4 Headset Ball Bearings 50 A 11 388 exact matching.
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula: =LOOKUP(2;1/(LookupTable8[ProductID]=[@ProductID]);LookupTable8[Name])
Anders
Created Date Created by:
08-05-2020 Serdar

Data source: Microsoft AdventureWorks

ALT 6: FILTER
Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
FILTER is a new Office365 formula. You can use filter to replace
3 BB Ball Bearing 50 A 10 324
VLOOKUP. It is easier to use and read.
4 Headset Ball Bearings 1 A 6 512
4 Headset Ball Bearings 6 B 10 422
4 Headset Ball Bearings 50 A 11 388
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula =FILTER(LookupTable9[Name];LookupTable9[ProductID]=[@ProductID];"")
Anders
Created Date Created by:
08-05-2020 Serdar

Data source: Microsoft AdventureWorks

ALT 7: POWER QUERY


Inventory Table Lookup Table
ProductID LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 6 B 1 318 316 BL-2036 Blade 800 600
2 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 1 A 7 585
3 6 B 9 443 Power Query Table
3 50 A 10 324 ProductID Name LocationID Shelf Bin Quantity
4 1 A 6 512 1 Adjustable Race 1 A 1 408
4 6 B 10 422 1 Adjustable Race 6 B 5 324
4 50 A 11 388 1 Adjustable Race 50 A 5 353
316 5 A 11 532 2 Bearing Ball 1 A 2 427
316 10 B 1 388 2 Bearing Ball 6 B 1 318
316 50 B 8 441 2 Bearing Ball 50 A 6 364
317 1 C 1 283 3 BB Ball Bearing 1 A 7 585
317 5 A 1 158 3 BB Ball Bearing 6 B 9 443
317 50 A 21 152 3 BB Ball Bearing 50 A 10 324
4 Headset Ball Bearings 1 A 6 512
4 Headset Ball Bearings 6 B 10 422
4 Headset Ball Bearings 50 A 11 388
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152
Anders
Created Date Created by:
08-05-2020 Serdar

Data source: Microsoft AdventureWorks

ALT 8: POWER PIVOT DATA MODEL


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 6 B 1 318 316 BL-2036 Blade 800 600
2 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 1 A 7 585
3 6 B 9 443
3 50 A 10 324 Power Pivot - Data Model Relationship
4 1 A 6 512 ProductID Name LocationID Shelf Bin Sum of Quantity
4 6 B 10 422 1 Adjustable Race 1 A 1 408
4 50 A 11 388 1 Adjustable Race 50 A 5 353
316 5 A 11 532 1 Adjustable Race 6 B 5 324
316 10 B 1 388 2 Bearing Ball 1 A 2 427
316 50 B 8 441 2 Bearing Ball 50 A 6 364
317 1 C 1 283 2 Bearing Ball 6 B 1 318
317 5 A 1 158 3 BB Ball Bearing 1 A 7 585
317 50 A 21 152 3 BB Ball Bearing 50 A 10 324
3 BB Ball Bearing 6 B 9 443
316 Blade 10 B 1 388
316 Blade 5 A 11 532
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152
4 Headset Ball Bearings 1 A 6 512
4 Headset Ball Bearings 50 A 11 388
4 Headset Ball Bearings 6 B 10 422
Anders
Created Date Created by:
08-05-2020 Serdar

Data source: Microsoft AdventureWorks

ALT 9: POWER PIVOT RELATED


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 6 B 1 318 316 BL-2036 Blade 800 600
2 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 1 A 7 585
3 6 B 9 443
3 50 A 10 324 Power Pivot - RELATED
4 1 A 6 512 ProductID Name LocationID Shelf Bin Sum of Quantity
4 6 B 10 422 1 Adjustable Race 1 A 1 408
4 50 A 11 388 1 Adjustable Race 50 A 5 353
316 5 A 11 532 1 Adjustable Race 6 B 5 324
316 10 B 1 388 2 Bearing Ball 1 A 2 427
316 50 B 8 441 2 Bearing Ball 50 A 6 364
317 1 C 1 283 2 Bearing Ball 6 B 1 318
317 5 A 1 158 3 BB Ball Bearing 1 A 7 585
317 50 A 21 152 3 BB Ball Bearing 50 A 10 324
3 BB Ball Bearing 6 B 9 443
316 Blade 10 B 1 388
316 Blade 5 A 11 532
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152
4 Headset Ball Bearings 1 A 6 512
4 Headset Ball Bearings 50 A 11 388
4 Headset Ball Bearings 6 B 10 422
Grand Total 6822
Anders
Created Date Created by:
08-05-2020 Serdar
Data source: Microsoft AdventureWorks

ALT 10: OFFSET INDEX-MATCH


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
3 BB Ball Bearing 50 A 10 324
4 Headset Ball Bearings 1 A 6 512 This complex formula is not recommended as an
4 Headset Ball Bearings 6 B 10 422 alternative to VLOOKUP. It is hard to maintain, easy to
break down, and it may impact performance in bigger
4 Headset Ball Bearings 50 A 11 388
workbooks.
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula: =OFFSET(INDEX(Lookup_Table13[#Headers];;1);MATCH([@ProductID];Lookup_Table13[ProductID];0);MATCH(C$8;Lookup_Table13[#Headers];0)-1)
Anders
Created Date Created by:
Data source: Microsoft AdventureWorks 08-05-2020 Serdar

ALT 11: INDIRECT ADDRESS


Inventory Table Lookup Table
ProductID Name LocationID Shelf Bin Quantity ProductID ProductNumber Name SafetyStockLevel ReorderPoint
1 Adjustable Race 1 A 1 408 1 AR-5381 Adjustable Race 1000 750
1 Adjustable Race 6 B 5 324 2 BA-8327 Bearing Ball 1000 750
1 Adjustable Race 50 A 5 353 3 BE-2349 BB Ball Bearing 800 600
2 Bearing Ball 1 A 2 427 4 BE-2908 Headset Ball Bearings 800 600
2 Bearing Ball 6 B 1 318 316 BL-2036 Blade 800 600
2 Bearing Ball 50 A 6 364 317 CA-5965 LL Crankarm 500 375
3 BB Ball Bearing 1 A 7 585
3 BB Ball Bearing 6 B 9 443
3 BB Ball Bearing 50 A 10 324 This complex formula is not recommended as an
4 Headset Ball Bearings 1 A 6 512 alternative to VLOOKUP. It is hard to maintain, easy to
4 Headset Ball Bearings 6 B 10 422 break down, and it may impact performance in bigger
4 Headset Ball Bearings 50 A 11 388 workbooks.
316 Blade 5 A 11 532
316 Blade 10 B 1 388
316 Blade 50 B 8 441
317 LL Crankarm 1 C 1 283
317 LL Crankarm 5 A 1 158
317 LL Crankarm 50 A 21 152

Formula: =INDIRECT(ADDRESS(ROW($I$8)+MATCH([@ProductID];Lookup_Table14[ProductID];0);MIN(COLUMN(Lookup_Table14[#Headers]))+MATCH($C$8;Lookup_Table14[#Headers];0)-1))

You might also like