Need to Add 2 Additional statements to this formula

thewiseguy

Well-known Member
Joined
May 23, 2005
Messages
956
Office Version
  1. 365
Platform
  1. Windows
=IFERROR(IFERROR(VLOOKUP(B12,ECM_BOM_Table,7,0),VLOOKUP(B12,CONTROLS_BOM_TABLE,7,0)),VLOOKUP(B12,ACCESSORIES_BOM_TABLE,7,0))

I need to add:

VLOOKUP(B12,MATERIALS_BOM_TABLE,7,0)
VLOOKUP(B12,RENTAL_EQUIPMENT_BOM_TABLE,7,0)

Any help would be greatly appreciated!!!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Let's try the following formula:
Excel Formula:
=IFERROR(IFERROR(IFERROR(IFERROR(VLOOKUP(B12,ECM_BOM_Table,7,0),VLOOKUP(B12,CONTROLS_BOM_TABLE,7,0)),VLOOKUP(B12,ACCESSORIES_BOM_TABLE,7,0)),VLOOKUP(B12,MATERIALS_BOM_TABLE,7,0)),VLOOKUP(B12,MATERIALS_BOM_TABLE,7,0))
 
Upvote 0
Solution
Let's try the following formula:
Excel Formula:
=IFERROR(IFERROR(IFERROR(IFERROR(VLOOKUP(B12,ECM_BOM_Table,7,0),VLOOKUP(B12,CONTROLS_BOM_TABLE,7,0)),VLOOKUP(B12,ACCESSORIES_BOM_TABLE,7,0)),VLOOKUP(B12,MATERIALS_BOM_TABLE,7,0)),VLOOKUP(B12,MATERIALS_BOM_TABLE,7,0))
thank you !
 
Upvote 0
Since you have MS 365 there are lot of of options.
You could use the XLookup built in not Found option and nest your XLookups.
You would need to put in the correct column headings.

Excel Formula:
=XLOOKUP(B12,ECM_BOM_Table[Col1],ECM_BOM_Table[Col7],
XLOOKUP(B12,CONTROLS_BOM_TABLE[Col1],CONTROLS_BOM_TABLE[Col7],
XLOOKUP(B12,ACCESSORIES_BOM_TABLE[Col1],ACCESSORIES_BOM_TABLE[Col7],
XLOOKUP(B12,MATERIALS_BOM_TABLE[Col1],MATERIALS_BOM_TABLE[Col7],
XLOOKUP(B12,RENTAL_EQUIPMENT_BOM_TABLE[Col1],RENTAL_EQUIPMENT_BOM_TABLE[Col7],
"Not Found")))))

Another option is that since the lookup typically looks from top to bottom vstack would simplify the formula quite a bit, with something like the below:
You would want to compare its performance though.
Excel Formula:
=VLOOKUP(B12,VSTACK(ECM_BOM_Table,ECM_BOM_Table,CONTROLS_BOM_TABLE,ACCESSORIES_BOM_TABLE,MATERIALS_BOM_TABLE,RENTAL_EQUIPMENT_BOM_TABLE),7,FALSE)
If performance was too slow you could do VStack once on a hidden sheet and refer to that in the VLookup so that the VStack is performed only once not on each row.
 
Upvote 0
Since you have MS 365 there are lot of of options.
You could use the XLookup built in not Found option and nest your XLookups.
You would need to put in the correct column headings.

Excel Formula:
=XLOOKUP(B12,ECM_BOM_Table[Col1],ECM_BOM_Table[Col7],
XLOOKUP(B12,CONTROLS_BOM_TABLE[Col1],CONTROLS_BOM_TABLE[Col7],
XLOOKUP(B12,ACCESSORIES_BOM_TABLE[Col1],ACCESSORIES_BOM_TABLE[Col7],
XLOOKUP(B12,MATERIALS_BOM_TABLE[Col1],MATERIALS_BOM_TABLE[Col7],
XLOOKUP(B12,RENTAL_EQUIPMENT_BOM_TABLE[Col1],RENTAL_EQUIPMENT_BOM_TABLE[Col7],
"Not Found")))))

Another option is that since the lookup typically looks from top to bottom vstack would simplify the formula quite a bit, with something like the below:
You would want to compare its performance though.
Excel Formula:
=VLOOKUP(B12,VSTACK(ECM_BOM_Table,ECM_BOM_Table,CONTROLS_BOM_TABLE,ACCESSORIES_BOM_TABLE,MATERIALS_BOM_TABLE,RENTAL_EQUIPMENT_BOM_TABLE),7,FALSE)
If performance was too slow you could do VStack once on a hidden sheet and refer to that in the VLookup so that the VStack is performed only once not on each row.

Will the XLOOKUP method work if the tables are actually just named ranges? They are not tables.
 
Upvote 0

Forum statistics

Threads
1,215,420
Messages
6,124,800
Members
449,189
Latest member
kristinh

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