+ Reply to Thread
Results 1 to 3 of 3

Trying to return value based on two cells in one row matching two different cells

  1. #1
    Registered User
    Join Date
    06-23-2011
    Location
    Nantucket, RI
    MS-Off Ver
    Excel 2003
    Posts
    35

    Trying to return value based on two cells in one row matching two different cells

    I have an issue I am trying to work through and would appreciate any assistance.

    I have two sheets.

    Sheet 1 contains master data:
    Column B is product name
    Column C is the list of ingredients
    Column G is the quantity of ingredients

    Sheet 2 is a table I am trying to populate:
    Across Row 1 are all possible ingredients for all products
    Down column A is list of all products.

    I would like to fill the sheet 2 table out by having excel look at the Name of the product in column A and the ingredient in row 1 and see if that combination exists in sheet 1.
    If the combination exists return the quantity from column G, if it does not exist return a 0.

    There will never be a case where there is more than one match to both product and ingredient.

    Thanks in advance and let me know if this is more information needed.

    Anthony
    Last edited by bellicusa; 08-11-2015 at 12:42 PM. Reason: Solved

  2. #2
    Registered User
    Join Date
    08-06-2015
    Location
    England
    MS-Off Ver
    2013
    Posts
    68

    Re: Trying to return value based on two cells in one row matching two different cells

    I believe this is what you need, in cell B2 in sheet 2:
    =IFERROR(INDEX(Sheet1!G:G,MATCH(Sheet2!A2&Sheet2!B1,Sheet1!B:B&Sheet1!C:C,0)),0)
    Confirm with CTRL+SHIFT+ENTER

  3. #3
    Registered User
    Join Date
    06-23-2011
    Location
    Nantucket, RI
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Trying to return value based on two cells in one row matching two different cells

    Very good and thank you Sinon05.

    I modified what you gave to better fit my sheet and now have:

    =IFERROR(INDEX(Sheet1!$G:$G,MATCH(Sheet2!$A2&Sheet2!C$1,Sheet1!$B:$B&Sheet1!$C:$C,0)),0)

    My change enabled me to copy this formula across all 279 columns and down all 464 rows.
    If I CSE in any given cell the value returned is perfect.

    Every cell is a little different because it points to either a different product or a different ingredient.
    Is there a way that I can CSE the whole 279x464 block while keeping each individual cells information intact?

    Thanks again,
    Anthony

+ 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. [SOLVED] lookup a range of cells and populate specific cells based on matching data
    By RobertM01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2014, 08:18 PM
  2. [SOLVED] looking for VBA code to return a value in a single cell of the sum of cells with matching
    By Rob69mfj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2014, 05:33 PM
  3. [SOLVED] Matching combination of two cells with a table and return value
    By coconutxyz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2014, 10:09 AM
  4. Help matching cells and then looking at other column based on those matching cells
    By Ppessina in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-27-2013, 02:37 PM
  5. [SOLVED] Matching multiple cells and return certain values
    By JakeMann in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-14-2012, 08:18 AM
  6. Vlookup & return all values by matching 2 cells
    By PY_ in forum Excel General
    Replies: 2
    Last Post: 09-12-2010, 11:08 AM
  7. Compare Ranges/Return Specific Value for Matching Cells
    By orutulsa in forum Excel General
    Replies: 1
    Last Post: 01-12-2008, 02:53 PM

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