Substitute for a LARGE xlookup formula?

thewiseguy

Well-known Member
Joined
May 23, 2005
Messages
1,015
Office Version
  1. 365
Platform
  1. Windows
Hi all. Someone mentioned to me that the formulas I am using are ridiculous (I don't disagree). Is there something other than VBA that would simplify this formula? Basically I am constantly looking up data over multiple tables (and the number of tables does increase form time to time). Any help or direction is greatly appreciated!

=IFERROR((XLOOKUP(B4,Tbl_Area[MaskedPartNumber],Tbl_Area[BooksPartNumber],XLOOKUP(B4,Tbl_Decorative[MaskedPartNumber],Tbl_Decorative[BooksPartNumber],XLOOKUP(B4,Tbl_Downlight[MaskedPartNumber],Tbl_Downlight[BooksPartNumber],XLOOKUP(B4,Tbl_Exit_and_Emergencies[MaskedPartNumber],Tbl_Exit_and_Emergencies[BooksPartNumber],XLOOKUP(B4,Tbl_Flat_Panel[MaskedPartNumber],Tbl_Flat_Panel[BooksPartNumber],XLOOKUP(B4,Tbl_Flood_Light[MaskedPartNumber],Tbl_Flood_Light[BooksPartNumber],XLOOKUP(B4,Tbl_Garage_and_Canopy[MaskedPartNumber],Tbl_Garage_and_Canopy[BooksPartNumber],XLOOKUP(B4,Tbl_Highbay[MaskedPartNumber],Tbl_Highbay[BooksPartNumber],XLOOKUP(B4,Tbl_Linear[MaskedPartNumber],Tbl_Linear[BooksPartNumber],XLOOKUP(B4,Tbl_Lowbay[MaskedPartNumber],Tbl_Lowbay[BooksPartNumber],XLOOKUP(B4,Tbl_Strip[MaskedPartNumber],Tbl_Strip[BooksPartNumber],XLOOKUP(B4,Tbl_Troffer[MaskedPartNumber],Tbl_Troffer[BooksPartNumber],XLOOKUP(B4,Tbl_Vapor_Tight[MaskedPartNumber],Tbl_Vapor_Tight[BooksPartNumber],XLOOKUP(B4,Tbl_Wall_Mount[MaskedPartNumber],Tbl_Wall_Mount[BooksPartNumber],XLOOKUP(B4,Tbl_Wrap[MaskedPartNumber],Tbl_Wrap[BooksPartNumber],XLOOKUP(B4,Tbl_A_Lamp[MaskedPartNumber],Tbl_A_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_BR_Lamp[MaskedPartNumber],Tbl_BR_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_Candle_Lamp[MaskedPartNumber],Tbl_Candle_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_CFL_Lamp[MaskedPartNumber],Tbl_CFL_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_Filament_Lamp[MaskedPartNumber],Tbl_Filament_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_Globe_Lamp[MaskedPartNumber],Tbl_Globe_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_HID_Lamp[MaskedPartNumber],Tbl_HID_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_MR_Lamp[MaskedPartNumber],Tbl_MR_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_Par_Lamp[MaskedPartNumber],Tbl_Par_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_Linear_Lamp[MaskedPartNumber],Tbl_Linear_Lamp[BooksPartNumber],XLOOKUP(B4,Tbl_Materials[MaskedPartNumber],Tbl_Materials[BooksPartNumber],XLOOKUP(B4,Tbl_Rental[MaskedPartNumber],Tbl_Rental[BooksPartNumber],XLOOKUP(B4,Tbl_Accessory[MaskedPartNumber],Tbl_Accessory[BooksPartNumber],XLOOKUP(B4,Tbl_Controls[MaskedPartNumber],Tbl_Controls[BooksPartNumber],XLOOKUP(B4,Tbl_Recycling[MaskedPartNumber],Tbl_Recycling[BooksPartNumber],XLOOKUP(B4,Tbl_Recessed_Retrofit_Kit[MaskedPartNumber],Tbl_Recessed_Retrofit_Kit[BooksPartNumber],XLOOKUP(B4,Tbl_Linear_Retrofit_Kit[MaskedPartNumber],Tbl_Linear_Retrofit_Kit[BooksPartNumber],XLOOKUP(B4,Tbl_Labor[MaskedPartNumber],Tbl_Labor[BooksPartNumber])))))))))))))))))))))))))))))))))),"")
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
You can use VSTACK to aggregate all the tables.
 
Upvote 0
Something like this.
Book3
ABCDEFGHIJK
1NameCategoryNameCategoryVSTACKLookup ValueResult
2AppleFruitOrangeFruitAppleFruitBananaFruit
3BananaFruitPineappleFruitBananaFruit
4LettuceVegetablesCarrotVegetablesLettuceVegetables
5OrangeFruit
6PineappleFruit
7CarrotVegetables
Sheet2
Cell Formulas
RangeFormula
G2:H7G2=VSTACK(Table1,Table2)
K2K2=XLOOKUP(J2,G2:G7,H2:H7,"")
Dynamic array formulas.
 
Upvote 0
Something like this.
Book3
ABCDEFGHIJK
1NameCategoryNameCategoryVSTACKLookup ValueResult
2AppleFruitOrangeFruitAppleFruitBananaFruit
3BananaFruitPineappleFruitBananaFruit
4LettuceVegetablesCarrotVegetablesLettuceVegetables
5OrangeFruit
6PineappleFruit
7CarrotVegetables
Sheet2
Cell Formulas
RangeFormula
G2:H7G2=VSTACK(Table1,Table2)
K2K2=XLOOKUP(J2,G2:G7,H2:H7,"")
Dynamic array formulas.

so am I essentially stacking all of my tables into 1?
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top