+ Reply to Thread
Results 1 to 3 of 3

Compare records from two excel files and Copy one column from one file to other.

  1. #1
    Registered User
    Join Date
    04-03-2016
    Location
    Chennai
    MS-Off Ver
    2013
    Posts
    39

    Compare records from two excel files and Copy one column from one file to other.

    We have two files. File1 and File2 with different contents and records are not aligned.

    File1 has many columns. Primary identifier are three columns A,B and C. Additionally column D has the data that needs to be copied to File2.
    File2 will also have the same three columns.

    Code:
    In both the files the records are not in same order.
    We need to take first record(coulm A B and C) from file1 match it with the available records from File2. Then update(copy & paste) the column D from file1 to Column D of File2.

    This needs to be done for all the records in File1.

    Records are nothing but rows.

    Thanks,
    Balaji N

  2. #2
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Compare records from two excel files and Copy one column from one file to other.

    @ balajinatarajan

    If File1 and File2 are sheets in the same book,
    you can try this code

    Please Login or Register  to view this content.
    Barriers are there for those who don't want to dream

  3. #3
    Registered User
    Join Date
    04-03-2016
    Location
    Chennai
    MS-Off Ver
    2013
    Posts
    39

    Re: Compare records from two excel files and Copy one column from one file to other.

    Quote Originally Posted by vichopalacios View Post
    @ balajinatarajan

    If File1 and File2 are sheets in the same book,
    you can try this code

    Please Login or Register  to view this content.
    Thanks. It works with charm.

+ 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. TWO Excel files, compare and return column values
    By Elenot in forum Excel General
    Replies: 4
    Last Post: 08-29-2015, 08:07 AM
  2. Macro to generate 1K files from source excel file with unique records in 2 cell
    By mak177 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2015, 02:41 AM
  3. Replies: 2
    Last Post: 09-18-2014, 05:42 AM
  4. comparing two excel files and saving the unique records in file 1
    By irfanparbatani in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-14-2014, 09:18 AM
  5. Compare files to find revised and new records
    By beenile in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-22-2013, 11:20 AM
  6. Search and Copy files from a column of file names excel vba
    By net4earning in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-18-2011, 07:58 AM
  7. Compare 2 excel files, report MISSING and DUP records
    By excelnovic in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2009, 11:58 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