VLOOKUP with IF function across multiple tables

Copper Contributor

I have a total sold column in each of the 10 tables i have in my workbook (each on a different tab). Not all tables contain the same items but most do. For example "Coke" may be on 5 of the 7 tables. I want to pull the total amount of Coke sold across all tables to my totals summary tab. 

 

What I am currently doing is =vlookup(coke,tableA,49,False)+Vlookup(coke,TableB,49,False)+Vlookup(coke,TableC,49,False)+Vlookup(coke,TableD,49,False)

because coke is not on tableE, tableF, or tableG at this time. 

 

However if I add coke to TableE later on then I would have to go back and change my formula to include another Vlookup.

 

What I would like to do be able to so is:

=(if tableA contains "coke", then vlookup(coke,TableA,49,False), if not then dont return anything for this part of the equation)+(if TableB contains "coke", then vlookup(coke,TableB,49,False), if not then dont return anything for this part of the equation)+.....and so on for all 7 tables that way if add coke to TableE,F, or G later on I dont have to redo the formula. 

2 Replies
May I know if the following formula fit your need

=IFERROR(vlookup(coke,tableE,49,False),0)

I think it does, I am not getting any errors. Is there anything wrong with having more than 7 of these stung together with a + sign, in one cell?