+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Matching cells across different worksheets

  1. #1
    Registered User
    Join Date
    04-25-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    8

    Matching cells across different worksheets

    Hello, I am still having trouble with my monster excel workbook,

    Can anybody please tell me if it is possible to do the following:

    If in sheet 1 I have a list of products linked to different characteristics in the same row, such as price:

    Product 1, style 2, price 1.3, collection ABC etc...(through 94,000 rows of product!)

    and in sheet 2 I have some of the same products, but maybe only 5,000 of the 94,000 above, and with different characteristics:

    Product 1, north region, winter season....etc,

    Is it possible to apply the price from sheet one to the correct row of the corresponding product in sheet 2?

    In other words match a criteria across two sheets (product code) and add a corresponding data cell from one sheet to another?

    Hope I explained it okay, and as ever thank you for your help.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Matching cells across different worksheets

    On sheet2 in the columns where you want to bring across data from sheet1, use a VLOOKUP or INDEX/MATCH.

    =VLOOKUP(A2, Sheet1!$A:$C, 3, FALSE)

    =INDEX(Sheet1$C:$C, MATCH(A2, Sheet1!$A:$A, FALSE))
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-25-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Matching cells across different worksheets

    Thank you JB,

    I'm sorry to trouble you further but could you show me that in the attached example. It would be to get the "current price" from sheet 1 into the corresponding product row of sheet 2.

    I'm not sure that I exactly understood the formula so it would be really helpful to see it in action.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-25-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Matching cells across different worksheets

    OK, Great, I have got that to work with the VLOOKUP function, but can I now add a twist?

    Can I make the VLOOKUP match 2 values on sheet 1, with the corresponding 2 values on sheet 2 to return a third value.

    Its the same as the previous example but instead of just looking up the product code in column A, it also needs the country code from column B.

    I have attached an excel template that contains what I am talking about. See that product W15004 sells in UK and Germany, so would need to pick up the correct price for each location.

    Is that possible?
    Attached Files Attached Files

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Matching cells across different worksheets

    In F2:

    =IF(B2="", VLOOKUP(A2, Table!$A:$M, 13, FALSE), INDEX(Table!$M$1:$M$100, MATCH($A2&$B2, INDEX(Table!$A$1:$A$100 & Table!$B$1:$B$100, 0), 0)))

  6. #6
    Registered User
    Join Date
    04-25-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Matching cells across different worksheets

    Thanks, do you have any idea why I get a pop up window when I try to apply this formula to the cell? I have attached a picture of what happens whenever I paste the formula. Confused...

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Matching cells across different worksheets

    THose are usually caused by errors in the sheet name in the formula.

+ 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