Hi all,
I am new to excel but am trying to complete a uni assignment.
I am making a food consumption log where I have columns labelled "Food", "Servings", "Calories", "Fat", "Protein", "Carbs" and "Fibre."
The "Food" column consists of a drop down box of thousands of food options from a "Food Nutrition Data" sheet that lists the food and its corresponding calories, fat, protein, carbs and fibre content horizontally for each food. My task is to input a formula into the "food consumption log" sheet that will retrieve the Calories, Fat, Protein, Carbs, and Fibre from "Food Nutrition Data" sheet and multiply it by the servings in the second column for whatever food the user selects from the "Food" drop down box.
The formula I am using is =IF($C2="","",$D2*VLOOKUP($C2,FoodLookup,MATCH(E$1,'Food Nutrition Data'!$C$1:$H$1,0),0)) but it keeps saying #N/A. (FoodLookup is just the named range for the data in the Food Nutrition Table)
I hope you can understand what I'm trying to do from this description. Any help is appreciated!
Thank you
Food Nutrition Data: Food Nutrition Data.png
Food Consumption Log: Food Consumption Log.png
Bookmarks