+ Reply to Thread
Results 1 to 2 of 2

Thread: Pull data from and to cells

  1. #1
    Registered User
    Join Date
    04-21-2007
    Posts
    3

    Question Pull data from and to cells

    So I'm trying to create a food calculator that automatically places the values for Fats, Carbs, and Proteins based on the name of the food. Essentially, if column A = column J, then automatically pull the amount so that the corresponding values of J get pulled over also; so that column B = column K, col C = col L and col D = col M. I want to get it so that I just have to type the name of the food item, and it fills in the rest based on the database values on the right.

    I have attached a picture of the sheet I'm working on to get a clearer idea of what I'm talking about. It seems like there should be some formula to do this, but I can't seem to get it done. All help is appreciated, and thanks ahead of time!
    Attached Images Attached Images
    Last edited by Wiseguy158; 08-24-2011 at 11:54 PM. Reason: Problem Solved

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,640

    Re: Pull data from and to cells

    Have a look at VLOOKUP in Excel help files.

    e.g.

    =IF($A2="","",VLOOKUP(A2,$J:$O,2,FALSE))

    This first looks to see if there is anything in A2, if not it returns a blank... then it looks for value of A2 in column J and returns result from column 2 of that table.

    Copy formula down.

    For next column sub the 2 for a 3, and copy down, etc...
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0