+ Reply to Thread
Results 1 to 6 of 6

Compare two sheets and copy data from sheet to another.

  1. #1
    Forum Contributor
    Join Date
    03-02-2018
    Location
    england
    MS-Off Ver
    2016
    Posts
    156

    Compare two sheets and copy data from sheet to another.

    Hi,

    There are two sheets from two different workbooks.

    I want to compare the 2 workbooks. But I only need to compare column C in the first workbook against column D in the second workbook.

    Then if they matches it will then copy whatever is in column A in the first workbook to the other workbook to column U.

    I'm not sure if this can be compare but in workbook one col C is something like this "1DR-RB-82903" and in the other workbook is this "1DR-RB-82903(2A-10KT6574F)RB1".

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Compare two sheets and copy data from sheet to another.

    Formula in U2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-02-2018
    Location
    england
    MS-Off Ver
    2016
    Posts
    156

    Re: Compare two sheets and copy data from sheet to another.

    Thanks jindon!

    The formula works great.

    But is it possible to do this with the code? Because workbook1 will be deleted afterward.

    Thanks

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Compare two sheets and copy data from sheet to another.

    Try
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-02-2018
    Location
    england
    MS-Off Ver
    2016
    Posts
    156

    Re: Compare two sheets and copy data from sheet to another.

    Hi jindon,

    Thanks for the code it works great.

    But I have try this on other workbook with the same format but it didn't work.

    I don't quite understand this part of the code
    Please Login or Register  to view this content.
    And this part.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Compare two sheets and copy data from sheet to another.

    What do you mean by
    it didn't work.
    You don't have matching data, so it should return blanks.
    Anyway, you now have space before (, so change to
    Please Login or Register  to view this content.

+ 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: 4
    Last Post: 08-03-2017, 04:31 PM
  2. Compare Sheets In Workbook Copy To Sheet Three
    By gaspower in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2015, 11:54 AM
  3. Compare 2 sheets and copy new records into result sheet
    By Chandrahaas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2014, 04:28 AM
  4. 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
  5. macro to compare 2 sheets row wise and copy unmatched data to 3rd sheet
    By prachi b in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-07-2012, 01:46 AM
  6. Compare Value between 6 sheets and copy the highest value into different sheet
    By djmal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2010, 05:00 AM
  7. Compare a value with value in other sheets and then COPY data into a sheet.
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-28-2009, 03:05 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