Bring nutrition values across from food selected from dropdown list

NoniJ

New Member
Joined
May 7, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I do hope someone can help me please. :)

I'm putting together a daily food intake/nutrition spreadsheet for my 14yo basketball son, so he can track what he's eating and maintain a healthy balanced plan.

I have all our regularly consumed food and nutrition values maintained in a sheet called FOOD.

1715126586009.png


I have his daily food consumption maintained in another sheet called DIARY

1715126679395.png


In this example , I have cut/paste his food consumption from the FOOD sheet into the DIARY sheet (cumbersome and must be a better way).

Within the DIARY sheet, I'd like a dropdown selection of all foods (with sub-headings) for him to select, THEN bring the associated nutrition values across as per the food he selected.

Can someone please assist me with this?

I have tried using the INDIRECT function however, I need a separate sheet for each food item which I believe there MUST be an easier way to do this.

1715127235233.png


I have also created worksheets, separating each sub-heading (BREAD/CEREAL/DAIRY, etc) copying data from the FOOD list with nutrition content) - not sure if this helps.

Worksheet called PASTA
1715128278807.png


I appreciate your time and hope someone can provide instructions of how to bring the Nutrition value through (which corresponds with food item selected from the Dropdown List).

With thanks,
Noni


Minisheets
Eamon's Meal Plan.xlsx
J
15
FOOD

Eamon's Meal Plan.xlsx
E
48
DIARY

Eamon's Meal Plan.xlsx
C
27
PASTA
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
If all your food is on the Food sheet it makes it easier vs multiple sheets.
- Have just your food and headers in one column. (If A, just delete the word "Food" on the Food tab.)
- Create a drop down list by going to Data, and in the Data Tools select Data Validation
- Under Allow, select List
- Under Source, either select Column A on the Food tab or type the following =Food!$A:$A
- Make sure Ignore Blank and In Cell Dropdown both have a check beside them
- Click OK
- Then just copy them down the page where needed

To do the lookup, use XLookup (since you are using Office 365). You will set the first row independently, but then you can copy it down the page. See equations below:
Book1
BCDEFGH
4BreakfastQtyCaLProteinSugarCarbsFat
5multigrain218791.7273.6
Diary
Cell Formulas
RangeFormula
C5C5=XLOOKUP(B5,Food!A:A,Food!B:B,"")
D5D5=XLOOKUP(B5,Food!A:A,Food!D:D,"")
E5E5=XLOOKUP(B5,Food!A:A,Food!E:E,"")
F5F5=XLOOKUP(B5,Food!A:A,Food!F:F,"")
G5G5=XLOOKUP(B5,Food!A:A,Food!G:G,"")
H5H5=XLOOKUP(B5,Food!A:A,Food!H:H,"")
Cells with Data Validation
CellAllowCriteria
B5:B9List=Food!$A:$A


I hope this helps.
 
Upvote 0

Forum statistics

Threads
1,216,117
Messages
6,128,937
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top