thewiseguy
Well-known Member
- Joined
- May 23, 2005
- Messages
- 1,015
- Office Version
- 365
- Platform
- 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])))))))))))))))))))))))))))))))))),"")
=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])))))))))))))))))))))))))))))))))),"")