The spreadsheet’s functionality is powerful but can get ugly fast. I developed a whole diet tracking set of spreadsheets at one point. I would have one table of foods and then their macro nutrients breakdown. Then each daily diet would reference the foods and the amount I would eat and pull the nutrient information out and calculate the serving information. It was a bunch of trial and error to get it there and not all that pretty by the end, but served me well.