Dave Kong
asked on
Excel 2010: How can I automatically adjust cell values based on the content of other cells? (follow up to #28590569)
In ID #28590569, an Excel workbook (food log) was modified to allow the quick entry of data by selecting food item names from a dropdown list populated by a master data worksheet. Selecting a name from the list enters that name and populates adjacent cells automatically with the associated values from the master list (protein, carbs, fats, total calories and serving size).
Now that that is working beautifully, I want to automatically compare the total serving size entered by the above process to the actual serving size listed entered in column A. If the numbers are different, the percentage difference in the portions needs to be calculated and then applied to the numbers for protein, carbs, fats and total calories, so they are adjusted to reflect the actual serving size.
Food-Log-December-2014.xlsm
Now that that is working beautifully, I want to automatically compare the total serving size entered by the above process to the actual serving size listed entered in column A. If the numbers are different, the percentage difference in the portions needs to be calculated and then applied to the numbers for protein, carbs, fats and total calories, so they are adjusted to reflect the actual serving size.
Food-Log-December-2014.xlsm
You need an IF statement for the comparison and then, use the suggestion from above.
Why is an if required? If they are the same the multiplication will be by 1
mlmcc
mlmcc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Gowflow:
Thank you! I am on a deadline but will check out the file later today.
Dave
Thank you! I am on a deadline but will check out the file later today.
Dave
ASKER
Gowflow!
It's incredible! It works beautifully. When you enter a new item, if you fill out the actual portion first it just does the calculation. This is even better than I had imagined. THANK YOU!
Where do we go from here? Do I need to open another question for you to set up the base sheet as you had suggested?
Dave
It's incredible! It works beautifully. When you enter a new item, if you fill out the actual portion first it just does the calculation. This is even better than I had imagined. THANK YOU!
Where do we go from here? Do I need to open another question for you to set up the base sheet as you had suggested?
Dave
yes please as this is a total different issue altogether. PLease post a copy of the address of the new question in here if you need my help. as just the ID (and the wrong one will not help !!! :)
gowflow
gowflow
ASKER
Will do later today. Thanks!
Dave
Dave
Pls If you need my help just wait for a sign as I will be off most of the day on Sat.
Tks
gowflow
Tks
gowflow
ASKER
You deserve a day off! Have a great time!
Dave
Dave
Sorry for the delay had to take my son to ski for the weekend !!! :)
back to biz
gowflow
back to biz
gowflow
ASKER
I hope you had a great ski weekend. I am closing out this case and have opened a new case for the final work:
https://www.experts-exchange.com/questions/28599000/Excel-2010-How-do-I-modify-my-base-worksheet-to-perform-like-the-model-sheet-and-automate-copies-of-the-base-sheet-follow-up-to-28595451.html
https://www.experts-exchange.com/questions/28599000/Excel-2010-How-do-I-modify-my-base-worksheet-to-perform-like-the-model-sheet-and-automate-copies-of-the-base-sheet-follow-up-to-28595451.html
ASKER
Gowflow has done it again! The actual portion size is entered, the food item is selected, and the corresponding macronutrient values automatically calculate to match the portion size. The size can be changed and the values recalculated - very flexible. Another super job!
Tks for the very nice appreciation and comment.
gowflow
gowflow
[Protein Value] * [ColumnA] / [ServingSizeValue]
mlmcc