Results 1 to 6 of 6

Single Criteria Multiple Matches

Threaded View

  1. #1
    Registered User
    Join Date
    09-27-2009
    Location
    texas
    MS-Off Ver
    mac 2004
    Posts
    6

    Single Criteria Multiple Matches

    Hi. I am very new to VBA and need help with a macro. I am comparing Sheet1 Column A in two different workbooks. WB1 has the same order numbers as Column A in WB2 but WB2 could have the order number listed multiple times but not always. I need the macro to return the data in 2 columns, H & B of WB2 to Column B & K, respectively, of WB1 for each instance of the order number. This is why a simple vlookup will not work. So a new row needs to be inserted below the order number in WB1 if there is more than one instance of it in WB2. Basically the below steps.

    1. Match order #'s in ColA WB1 to ColA WB2.
    2. Paste data from WB2 Cols H&B to Cols B&K in original row of WB1.
    3. Then insert new row directly beneath order # in WB1 for each duplicate order number and paste order # in ColA and data from Cols H&B to Cols B&K.

    Does this make any sense?
    Can anyone help?

    I have include sample copies of the workbooks.

    Thank you.
    Attached Files Attached Files
    Last edited by mtntxn; 01-08-2011 at 01:56 AM.

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