+ Reply to Thread
Results 1 to 6 of 6

If a cell contains text (from another worksheet), populate another cell with...

  1. #1
    Registered User
    Join Date
    12-30-2014
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    If a cell contains text (from another worksheet), populate another cell with...

    I am trying to make a food cost worksheet that will calculate how much a recipe is costing me to make. I currently have two worksheets in my document. Sheet 1 is called "Ingredients Cost" and Sheet 2 is called "Fettuccine Alfredo" (my first recipe I am analyzing).

    In my "Ingredients Cost" sheet I have the name of the ingredient as well as cost information (package size, serving size, cost per serving, etc.). In my "Fettuccine Alfredo" sheet I have several fields - Ingredient (which I will populate the name from the "Ingredients Cost" sheet (i.e. ='Ingredients Cost'!A11). I will manually enter the recipe information (how much I need of the ingredient). I then need the "Cost Per Unit" to populate from "Ingredients Cost" sheet based on the ingredient I chose.

    In other words, I need a formula that would know that cell A3 on sheet "Fettuccine Alfredo" (my ingredient) is pulling from cell A11 on sheet "Ingredients Cost" - and would then populate cell D3 on sheet "Fettuccine Alfredo" with cell I11 on sheet "Ingredients Cost."

    I am currently having to do this manually for each ingredient and it would be a huge time saver to have a formula. Any help would be greatly appreciated!!!! Thank you so much!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: If a cell contains text (from another worksheet), populate another cell with...

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: If a cell contains text (from another worksheet), populate another cell with...

    Try

    in "Fettuccine Alfredo"!D3
    =INDEX("Ingredients Cost"!A1:I100,MATCH(A3,"Ingredients Cost"!A1:A11,0),9)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Registered User
    Join Date
    12-30-2014
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    Re: If a cell contains text (from another worksheet), populate another cell with...

    Thank you for the quick responses. I have attached my worksheet with only the data I mentioned in the post.

    Recipe Calculator Spreadsheet.xls

  5. #5
    Registered User
    Join Date
    12-30-2014
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    Re: If a cell contains text (from another worksheet), populate another cell with...

    Special-K - That is REALLY CLOSE! I was very excited when I tried it with the Fettuccine - worked perfectly. I even dragged the formula down a few ingredients and it worked for them as well. For some reason it did not work on a few of the ingredients. I have attached the more detailed spreadsheet so you can see what I am talking about.

    Recipe Calculator 2.xls

  6. #6
    Registered User
    Join Date
    12-30-2014
    Location
    Florida
    MS-Off Ver
    2010
    Posts
    4

    Re: If a cell contains text (from another worksheet), populate another cell with...

    Yay! I think I figured it out - it seems to be working now! I made a couple of minor adjustments to the code that Special-K provided.

    Original: =INDEX("Ingredients Cost"!A1:I100,MATCH(A3,"Ingredients Cost"!A1:A11,0),9)

    Modified: =INDEX('Ingredients Cost'!$A$1:$I$100,MATCH(A3,'Ingredients Cost'!$A$1:$A$11,0),9)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 15
    Last Post: 12-05-2014, 01:14 AM
  2. [SOLVED] type designate text in cell & have another cell automatically populate w/ designated #?
    By PeppiVic in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-02-2014, 03:46 PM
  3. Replies: 2
    Last Post: 03-17-2014, 12:14 PM
  4. Populate a worksheet cell from a textbox to the next available cell in column B
    By molesy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2013, 08:28 PM
  5. Replies: 2
    Last Post: 01-26-2011, 05:56 PM

Tags for this Thread

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.6.0 RC 1