+ Reply to Thread
Results 1 to 3 of 3

Macro that copies data from one workbook to another

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    Brunswick
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro that copies data from one workbook to another

    Let's say that I have two workbooks: File X and File Y. (both .csv files) I am looking to create a Macro that copies from a certain cell in File X to a specific cell in File Y. This would be done based off a query.

    Example: Compares all values listed in Column A of File X to all values listed in Column A of File Y. If value matches in column A in both files (let’s say: IF ID = 5), it then retrieves information from Column J of File X for that row and pastes it in the corresponding row of File Y Column J.

    Is this possible? And if so, how could one do this?

  2. #2
    Registered User
    Join Date
    12-18-2012
    Location
    Brunswick
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro that copies data from one workbook to another

    It may not have to be a macro at all. This is what I have started..

    =IFERROR(VLOOKUP(MATCH(A2,X!$A$2:$A$11,0),X!$A$1:$J$11,10),"")

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro that copies data from one workbook to another

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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