+ Reply to Thread
Results 1 to 2 of 2

VBA Syntax for matching, copying and pasting

  1. #1
    Registered User
    Join Date
    02-07-2011
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    VBA Syntax for matching, copying and pasting

    I workbook 1 which has values in column A and data in B and C and a date in cell D1. In workbook 2 I have the same values in column A. On row 1, I have a date and then a column for comments which repeats so every second column is a date and comments as per below:

    Workbook 1:

    A B C D
    WS8.02 Pass 18/08/2012
    WS8.03 Pass
    WS8.04 Fail Comment


    Workbook 2:

    A B C D E F G
    18/08/2012 Comments 25/08/2012 Comments 01/09/2012 Comments
    WS8.02 Pass
    WS8.03 Pass
    WS8.04 Fail Comment

    I'd like a macro which will match the date and index the values in A and paste values from B & C in workbook 1 to workbook 2, I just don't know the syntax in VBA.

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA Syntax for matching, copying and pasting

    Want to get your question answered quickly?

    Ensure your question is not too vague. Don't assume anyone is familiar with your problem. While you can upload small attachments, describe your problem in the body of the post. We are fortunate to have several Excel gurus, but few mind-readers.
    On the other hand, skip irrelevant details. Be descriptive and concise. Short, direct, and to-the-point questions with apt thread titles are almost always answered promptly.
    Keep the scope reasonably narrow. Questions like, "How do I set up an accounting system in Excel?" might be a long time waiting.
    Explain what you've already tried. ("Calculation is set to automatic, but formulas still don't compute") so helpers don't waste your time or theirs.
    Post a WORKBOOK. Nobody wants to type data from a picture or paste text from your post into a spreadsheet as a prelude to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.
    If your question has not been answered within a day, consider adding another post with any additional information you believe is relevant. If you think your post is good as is, just reply to your own thread with the words "Bump no response", which will bring it to the top of the forum.

+ 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