+ Reply to Thread
Results 1 to 5 of 5

Searching For Text Across Different Sheets

  1. #1
    Registered User
    Join Date
    03-05-2012
    Location
    South East Tennessee
    MS-Off Ver
    Mac 2011
    Posts
    3

    Searching For Text Across Different Sheets

    I’m trying to find the right formula for adding values across different sheets after it finds the right text.

    From the attached spreadsheet, the formula I want to change is on “Wk1 Shopping List” in column C.

    My problem is that the values I have in column A on the FoodCosts sheet move around when I add new items, so I constantly have to change the formula on “Wk1 Shopping List” in column C each time this happens.

    Is there a way I can tell it to search for a certain text from column A on sheet “FoodCosts” (ex. “Avacado”) and once it is found, to then take the value from column D on that row and multiply it by the quantity specified in column B on sheet “Wk1 Shopping List”?

    Thanks.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Searching For Text Across Different Sheets

    As long as you keep the names the same in each sheet, the following formula will work...

    =VLOOKUP(A2,FoodCosts!$A$2:$D$22,4,FALSE)*'Wk1 Shopping List'!B2 copy this to all the cells in wk1 shopping list that you need it.

    When you start copying, note that the very 1st item in your list (and the very last 1 too), return a #NA value. This is because the names (apples - lb and apples/lb) dont match. If you want to ensure that the names are exactly the same, you (or I can, if you dont know how) can create a dropdown list on the 2nd sheet, based onthe names in the 1st sheet.

    Hope this helps, let me know if you need anything else?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-05-2012
    Location
    South East Tennessee
    MS-Off Ver
    Mac 2011
    Posts
    3

    Re: Searching For Text Across Different Sheets

    Great! That's perfect. Thank you.

    No, I'm not sure how to create a drop down list. I was just going to make sure everything matched perfectly.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Searching For Text Across Different Sheets

    Start with creating a named range on your items page, highight the range, right click and select "name a range". If you will be adding to the list, make sure the range is long enough to accomodate the growth, but you can always change the range later if needed. I made a range called "Items" in the attached sheet, from A2-A50

    Then in your Shopping list sheet, apply data validation to where you will be entering your data.../data, data toold, data validation, under "allow", select "list" and type inthe range name (in this case, I used =Items). Do this for all ranges where you will enter in your shopping list. Once you have done that, when you click on that cell, you will notice a drop-down at the top right of the cell, if you click on that, it will show you all the items in your (named) FoodCosts sheet

    I have attached a sample based on your info, hope this helps
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-05-2012
    Location
    South East Tennessee
    MS-Off Ver
    Mac 2011
    Posts
    3

    Re: Searching For Text Across Different Sheets

    Great! Thank you so much for your help.

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