Excel Expert Help Needed

AJ January 27, 2009 at 06:31:54
Specs: Windows XP
Hello, I have a form to create using Excel it has three lists,(done through validation). The items will be foods and I wwant to be able to auto populate 4 colums depending on the food selected.

For Example if I select Qty=1 - Item = Oatmeal - Amount = 1 Cup I need it to populate the Carbs, Protin, Fat and Calories automatically. I can do this with and If statement for one Item but as you can see i could have 50 different foods.

I'm thinking there has to be some sort of table i can create and reference it somehow.

Sample Form Titles

Qty - Item - Amount || Carbs - Protein - Fat - Calories

Thank you for your help.

See More: Excel Expert Help Needed

Report •

February 3, 2009 at 07:03:34
yeah you're looking for the VLOOKUP function. Search in help and you should be able to see how it works, but I would imagine you have a table with each food on sheet 1. Column A=Food name, B=carbs, C=protein, D=fat and E=calories

Then on your real sheet it would be


A2 is your quantity, so the VLOOKUP gets multiplied by this.

The B2 references the item name.

Sheet1!$A:$E refers to your table on sheet1.

The "2," tells the vlookup to pick out column 2 (carbs in this case): this would be changed to 3 for protein, etc.

Finally, "FALSE" means get an exact match.

Hope this helps

Report •
Related Solutions

Ask Question