Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Excel Problem

  1. Jun 19, 2006 #1
    Lets say I have the following spreadsheet.

    Code (Text):

         A              B            C            D            E
    1   Ingredient  Calories    Protein     Recipe     Calories
    2   Banana      100         1             =A2        ?

     
    Now what I want to do is lets say I click on cell D2 and type "=A2" (without quotes of course). What happens is that D2 would then equal "Banana". How could I automatically make E2 fill in the appropriate amount of calories for banana?

    I hope the way I worded this question makes sense.
     
  2. jcsd
  3. Jun 19, 2006 #2
    hmmmmm.... "=B2" but why would you want to have the same value twice??
     
  4. Jun 19, 2006 #3

    rcgldr

    User Avatar
    Homework Helper

    You probably want to use the VLOOKUP function. This function searches for a match (exact or range compare) in one column, then returns a value correspoding to the same row in another column.
     
  5. Jun 19, 2006 #4
    I want it to be automated.

    I want a "database" of different grocery items with some stats attached to them. For example,

    Code (Text):

    Item       Calories   Protein   Carbohydrates   Fat
    Soy Milk   100        6          9                     3
    Banana    110        1          32                    0
    Chicken    120        24        0                     0
     
    Then I want another "database" of recipes. Each recipe will consist of items taken from the grocery list. So, for example if I wanted to create a recipe item such as a banana shake I would just click under recipe, and then in the items list I would add the items by typing =XX where XX is the cell that I clicked on with the recipe name.

    Code (Text):

    Recipe                  Calories    Protein   Carbohydrates  Fat
    Banana Shake

    Soy Milk                100        6          9                     3
    Soy Milk                100        6          9                     3
    Banana                 110        1          32                    0

    Total                    310        13        50                    6
     
    I'm doing it this way because I don't have the time to put together a "real" program to do this. Hopefully this will suite my needs. It's going to be dirty, but oh well :)

    Thank you! Thank you! Thank you!

    That's exactly what I wanted. Mercy.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Excel Problem
  1. Excel + Calculations (Replies: 9)

Loading...