Question : Nutritional spreadsheet: multiple drop down list problems!

Ah hello

I am fiddling with a nutritional spreadsheet, but am having problems.  Please examine the attached XLS if you will...
 
Now, if you check out the big drop down (next to "Preset Programs"), it currently works, affecting the first % number (Carbs). (I'll eventually need all three to be affected.)
 
But each of those three (Carbs, Protein, Fats) themselves are drop downs. So firstly notice how it works (change the big drop down to "Preset Programs" and the carbs percent changes).  Then notice  the code that appears when you click on that first % number (without changing the selection):
 
=IF(B4="Fat Loss",40,IF(B4="Maintain/Standard Gain",50,IF(B4="Bulk",60,IF(B4="None Selected (Manual Mode)",0))))

(Probably not the best way to do this, I know, but I am an Excel novice...)

Then notice how, if you change that first percent figure via its drop down to something else, that code disappears and it breaks the funcionality.

So, the questions I have are really fundamentally quite simple, but since I don't know much about Excel I can't figure them :)

1) How can I stop this code disappearing when I change the carbs %?
2) Ideally, when the user changes the carbs, protein or fat %, the main combo should reset to "None selected (Manual mode)".  How can I do this?
 
I will ask other related questions I am sure as soon as these have been resolved (hence the 500 points) but for now can someone help with these please?

TIA
Attachments:
 
 

Answer : Nutritional spreadsheet: multiple drop down list problems!

try this solution:
(you will have to change a small bit to reflect your values for carbo, fats, proteins in macro)
Ive placed comments above the code located in sheet1 (ALT+11 to open editor)
Random Solutions  
 
programming4us programming4us