Hi ladherts,
Here is an example using VLOOKUP to retrieve the information form Data and place it into the correct cell in Nutrition.
Cells A6 to A14 of Nutrition contain copies of the popup menu list shown in this image. As no food has been chosen yet, the cells to the right of column A are all 'blank'.
The yellow filled row in Data is coloured manually to make the data in that row more visible for the example. The colour is NOT needed for operation of the document.
In the image below, the user has chosen "Food 8" from the popup menu in cell A6 and "Egg White" from the pop-up menu in cell A9, causing cells in columns B through G of those rows to be filled with the data from the rows of Data containing "Food 8" and "Egg White" in column A.
The formula shown below the Nutrition table, is entered as shown in the selected cell (B6), then filled right to G6 and down to row 14,
The formula has two parts—the VLOOKUP part that retrieves the information, wrapped in an IF part that acts as a switch to prevent VLOOKUP from being called before there is a choice made in column A of that row.
As the formula is filled right, the $ operator before each of the column references keeps that part of the reference fixed on the column containing the pop-up menu cells and on the range of columns (A to G) of the Data table.
As the formula is filled down, the number part of the two references to A6 increments to show the same row as is occupied by the row occupied by each copy of the formula.
VLOOKUP always searches in the leftmost column of the lookup table (in this case, column A of Data), then returns the value from the same row of the column specified by the number returned by the COLUMN function.
COLUMN returns the number of the column containing it, which matches the column from which it is to retrieve the data, so column B (2) of Nutrition gets the data from the second column of the lookup table, column B of Data..
Take time to reread as necessary, then enter the formula as shown, into B7 of your Nutrition table, replacing $A6 with $A7 to fit that location.
Regards,
Barry