Extraxting data from a table based on scroll-down menu selection

Copper Contributor


I made a table (let's call it Table 1) with nutritional facts based on 100g (except for one item). On another sheet I made another table (call it Table 2) with a drop-down menu to let you select the name of one of the items from the other sheet.

Is there a way to make Table 2 take the data relative data of the item chosen from the drop-down menu and put them in the corresponding cell?

For instance, suppose I choose "Egg", the following cells are Carbs, Prots, and Fats respectively, plus another one called Quantity. Is there a way to put those standard values for Egg in Table one in the corresponding cells in Table 2 and multiply them by the number put in Quantity? The only solution I can think of is a long series of IF, especially because there's that one item from Table 1 based on 60g and not 100g.


Thank you!

1 Reply


1. Normalize your values based on 1 g (in Table1).

2 Use XLOOKUP() to lookup the data from Table1 (in Table2) and multipy by Quantity.