+ Reply to Thread
Results 1 to 8 of 8

Help! compare 2 columns, different sheets, if value match copy the value of other cell

  1. #1
    Registered User
    Join Date
    04-14-2016
    Location
    SM, Romania
    MS-Off Ver
    2013
    Posts
    4

    Help! compare 2 columns, different sheets, if value match copy the value of other cell

    First if all, hello! My name is Adrian and I got here because I have to admit my knowledge of the excel is kinda poor, so is my friends knowledge. Hopefully I'll find help here.

    So I have a workbook with 2 sheets. I need to the formula to copy the value from Col B Sheet1 in Col C Sheet2 where the value from Col C Sheet1 matches the value from Col A Sheet2, same row. I hope I wrote this clear.

    sheet1.jpg
    sheet2.jpg

    Thank you in advance,

    Adrian
    Last edited by Nomood; 04-14-2016 at 12:59 AM.

  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
    53,051

    Re: Help! compare 2 columns, different sheets, if value match copy the value of other cell

    Hi, welcome to the forum

    You probably need to use VLOOKUP for this, but your data is a bit hard to separate Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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
    04-14-2016
    Location
    SM, Romania
    MS-Off Ver
    2013
    Posts
    4

    Re: Help! compare 2 columns, different sheets, if value match copy the value of other cell

    Sure man, I wasn't expecting an answer that soon.

    L.E. English is not my native language, just for the record. Thank you for your patience!
    Attached Files Attached Files
    Last edited by Nomood; 04-14-2016 at 01:06 AM.

  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
    53,051

    Re: Help! compare 2 columns, different sheets, if value match copy the value of other cell

    See if this is what you want...
    =IFERROR(INDEX(Sheet1!B:B,MATCH(Sheet2!A7,Sheet1!C:C,0)),"Not Found")
    copied down

  5. #5
    Registered User
    Join Date
    04-14-2016
    Location
    SM, Romania
    MS-Off Ver
    2013
    Posts
    4

    Re: Help! compare 2 columns, different sheets, if value match copy the value of other cell

    Wow, you're a sorcerer, right?
    Yes, it seems to be working after correcting/cleaning some of the data that needs to be compared. If it's not too much trouble, could you explain how the formula works, please?
    And thank you very much, if I'll ever get the chance, whatever is that you're drinking, the first 2 rounds will be on me, cause man you saved me a lot of time.

  6. #6
    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
    53,051

    Re: Help! compare 2 columns, different sheets, if value match copy the value of other cell

    haha thanks for the kind words, Im happy it worked for you

    then INDEX/MATCH is a very useful combo for finding a single piece of data

    syntax for INDEX = INDEX(range-to-search,row-to-use,column-to-use)

    If you are only using 1 column (or row) to find your data in, you can skip the column (or row) to use

    It then becomes...run down this column of data x-rows and give me what you find.

    The next trick is to determine the row, and for that, we use teh MATCH function.

    =MATCH(what=to-find, range-to search, 0) the 0 is for an exact match

  7. #7
    Registered User
    Join Date
    04-14-2016
    Location
    SM, Romania
    MS-Off Ver
    2013
    Posts
    4

    Re: Help! compare 2 columns, different sheets, if value match copy the value of other cell

    I see, I think I understand. Thank you again for the help =)

  8. #8
    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
    53,051

    Re: Help! compare 2 columns, different sheets, if value match copy the value of other cell

    Shout if you need more help

+ 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. Compare two sheets and copy match value to new sheet
    By sharan250 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2014, 12:50 AM
  2. compare two columns on different workbooks and if they match copy one cell.
    By gbest in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2014, 02:59 AM
  3. Compare Columns and Copy if match found
    By betsyroal in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2014, 07:58 AM
  4. Macro to Compare two sheets, if match then copy two cells from one sheet to the other
    By ali.whitaker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2012, 02:13 PM
  5. Compare 2 columns then copy and paste the adjucent cell value if match is found
    By smartisenthil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2012, 12:11 PM
  6. Replies: 20
    Last Post: 01-02-2011, 10:00 PM
  7. Compare two sheets, copy from one if values match
    By teaker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2009, 01:27 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