Hi,
Last days I've been trying to make from scratch a macronutrient diet-calculator but I don't really have the skills to make it work without help. I have listed all the food that I want to include in my calculator with all their protein, carbohydrate and fat.
eTi9zGR.png
Next to that there are 5 meals with 5 ingredients each one, where you can select each ingredient from a drop down list to make your meal based on what you have at home. After you choose each ingredient, you type down the amount in grams you want to assign.
H1lzZQp.png
Here comes the problem. Below all of this there is a "hidden" zone of calculations. In this zone I need to calculate every macronutrient of every ingredient separately, and then add them all up to show it clean and easy upwards. I was doing this:
=IFS($C3=$P4;$C4*Q4/100;$C3=$P5;$C4*Q5/100;$C3=$P6;$C4*Q6/100;$C3=$P7;$C4*Q7/100;$C3=$P8;$C4*Q8/100;$C3=$P9;$C4*Q9/100;$C3=$P10;$C4*Q10/100)
It was super tedious but it was working until I realised there is like a 130 argument limit and I had over 200 ingredients. I don't really know how to tell Excel to choose this amount of protein instead of that one based on what is the ingredient chosen on the drop down list. I hope I made myself clear, it's my first time writing in an english forum so is a bit complicated. Thanks in advance
zZ4j2xh.png
Bookmarks