Hi,
I am a complete beginner to excel VBA and macros.
I have an excel spreadsheet which I want to use like a daily meal planner based on nutritional requirements. The first column is the names of nutrients found in food such as calcium, vitamin A, protein, etc. Each following column's first row has the name of a food; then each column continues down with values for the nutrients listed in the first column per 100 grams of that food. The data is all taken from here: http://www.nal.usda.gov/fnic/foodcomp/search/. The last column contains the values required for someone of my age, weight, and activity. This data is taken from: http://fnic.nal.usda.gov/interactiveDRI/.
I'm finding it a real pain to regularly select foods from this sheet, paste them into a new sheet, adjust the amounts by pasting special (e.g. dividing by 2 to get 50 grams, etc.), and use the sum function to total if I've fallen within the required range with my daily diet, so...
I'd like to create a more me-friendly meal planning program. I think my original vision of what I'd like to create is probably very complex, so I can start by asking how to do some first most basic steps:
1. I want to create an interface that allows me to select columns based on the name of the food in the first row of the column. So I'm given a list of the foods and I check them off, for example.
2. Because I don't eat 100 gram portions of everything I want to be able to adjust gram amounts of the selected foods. So there's some kind of box where I enter the amount.
3. Then I want to total the selected columns in the amounts of just chosen and see the total nutrients obtained so far. So, a window would pop up showing a column of nutrient totals based on consumed food items next to a column showing the acceptable ranges for my age, weight, activity.
4. Then I could continue to add or subtract foods and adjust amounts until I found some good combinations to meet the daily nutritional requirements.
That is the simplified version! But only if I could get that far would I even think of going further. This alone would be an achievement to save me a lot of annoying copying, pasting and summing!
I would be much appreciative if anyone could help me out on this one!
Thanks,
Gu
I am a complete beginner to excel VBA and macros.
I have an excel spreadsheet which I want to use like a daily meal planner based on nutritional requirements. The first column is the names of nutrients found in food such as calcium, vitamin A, protein, etc. Each following column's first row has the name of a food; then each column continues down with values for the nutrients listed in the first column per 100 grams of that food. The data is all taken from here: http://www.nal.usda.gov/fnic/foodcomp/search/. The last column contains the values required for someone of my age, weight, and activity. This data is taken from: http://fnic.nal.usda.gov/interactiveDRI/.
I'm finding it a real pain to regularly select foods from this sheet, paste them into a new sheet, adjust the amounts by pasting special (e.g. dividing by 2 to get 50 grams, etc.), and use the sum function to total if I've fallen within the required range with my daily diet, so...
I'd like to create a more me-friendly meal planning program. I think my original vision of what I'd like to create is probably very complex, so I can start by asking how to do some first most basic steps:
1. I want to create an interface that allows me to select columns based on the name of the food in the first row of the column. So I'm given a list of the foods and I check them off, for example.
2. Because I don't eat 100 gram portions of everything I want to be able to adjust gram amounts of the selected foods. So there's some kind of box where I enter the amount.
3. Then I want to total the selected columns in the amounts of just chosen and see the total nutrients obtained so far. So, a window would pop up showing a column of nutrient totals based on consumed food items next to a column showing the acceptable ranges for my age, weight, activity.
4. Then I could continue to add or subtract foods and adjust amounts until I found some good combinations to meet the daily nutritional requirements.
That is the simplified version! But only if I could get that far would I even think of going further. This alone would be an achievement to save me a lot of annoying copying, pasting and summing!
I would be much appreciative if anyone could help me out on this one!
Thanks,
Gu