Forum Discussion

Orii120's avatar
Orii120
Copper Contributor
Mar 31, 2019

Help building a meal planner

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.

 

 

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

 

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

  • Twifoo's avatar
    Twifoo
    Silver Contributor
    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.
    • Twifoo's avatar
      Twifoo
      Silver Contributor
      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.
      • Orii120's avatar
        Orii120
        Copper Contributor

        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

Resources