Home

Help building a meal planner

Orii120
Occasional Contributor

Hey all,

 

I'm looking for some help with a meal planner I'm trying to set up. I know how I want it to function however getting there is proving challenging.

 

data.png

 

Sheet 2 (above) contains all of my data which is food, calories and macro-nutrients per gram.

 

data 2.png

Sheet 1 is the meal planner. I'll have drop down lists for each item of food per meal, and i'd like it to pull the data based on the food selected in the respective categories e.g: if chicken breast is selected it will populate the relevant protein, fat etc. from the data sheet.

 

I'd also like the sheet to multiply the data based on the number that is input into the 'grams' section.

e.g. if 300 grams of chicken breast is selected it will multiply and populate the data by 300.

 

I'd appreciate any help with this one, or even just advice on what functions i should be looking into etc.

 

Cheers. 

4 Replies
In Sheet1!D2, Enter this formula:
=VLOOKUP($B2,
Sheet2!$A:$E,
COLUMN(B1),0)
Then, you may copy the formula down rows and across columns.
The formula in Sheet1!D2 should be:
=$C2*
VLOOKUP($B2,
Sheet2!$A:$E,
COLUMN(B1),0)
I inadvertently forgot to multiply by $C2 in my earlier formula.

@Twifoo 
Hi there,

 

Thanks for taking the time to help me out with this one. I really appreciate it.

 

I've tried using your formula however I can only seem to get it to use the data from the calories column even when the formula has been dragged into the other cells.

 

Any ideas?

 

Thanks

I don’t think so. In Sheet1!D2, COLUMN(B1) becomes COLUMN(C1) when copied to E2, COLUMN(D1) when copied to F2, and COLUMN(E1) when copied to G2.
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
16 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
11 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies