+ Reply to Thread
Results 1 to 3 of 3

Merging / matching two lists according to multiple criteria with possible duplicates in

  1. #1
    Registered User
    Join Date
    09-30-2012
    Location
    Tel-Aviv
    MS-Off Ver
    Excel 2010
    Posts
    84

    Smile Merging / matching two lists according to multiple criteria with possible duplicates in

    Hi,
    I have two sets of what should be the same data, taken from different sources. These include variables such as
    Purchase Order Number,
    Order Date,
    Order Amount,
    Customer's email
    and others.

    We're trying to match the two lists to find errors (those would be the unmatchable rows).

    The thing is, the values (each one by itself) aren't unique in a data set. That is, the Purchase Order Number can appear in multiple rows in Set A and in Set B, for example. Other details would be different, such as Order Amount.
    The date is tricky and could be 1-2 off between the two lists for the same purchase order.

    Anyway, what I'm trying to ask here is how do I match these lists according to the multiple criteria, given that some values can be repeated? If everything was unique I guess I could find my way with VLOOKUPs.



    Thanks for your help

  2. #2
    Forum Contributor
    Join Date
    03-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    154

    Re: Merging / matching two lists according to multiple criteria with possible duplicates i

    Hi,

    I have the same issue with a problem of reconciling my inventories between what I say I have and what my vendor says I have in their warehouse.

    What I have done is created a vba solution to match the lists both ways based on the unique ID for each line (in my case, it is a combination of PO number and Item number)

    in order to get the unique ID of the combination of both, I created a helper column inserted to the left by concatenating the columns which make up the unique ID


    say you have the PO number in B1 and vendor number in C1 and that makes the unique ID, then insert a column at the beginning and in column A type...
    Please Login or Register  to view this content.
    drag formula down, do the same thing in the other sheet, and now you can use vlookup...

    if you can't insert the columns as the beginning, you can also add to the end and use a combination of the index/match functions.

    Let me know if this helps, if not post a sample and someone can look at it in more detail.

    thanks.

  3. #3
    Registered User
    Join Date
    09-30-2012
    Location
    Tel-Aviv
    MS-Off Ver
    Excel 2010
    Posts
    84

    Re: Merging / matching two lists according to multiple criteria with possible duplicates i

    Thanks for the answer. My case is a bit more complicate since the same fields in the two datasets can vary slightly. For example, the sale date can be 1 day off since the two sets are from different time zones. Also, there could be up to a $1 difference in some sales figures (decimals issue), so I needed a bit of flexibility. Plus, the natural key was not unique.

    What I ended up doing was kind of a left join in access, where each row in set A were joined with all possible rows from set B. This of course led to multiplications. Then I took it to excel and added columns to calculate whether the dates matched within 1 days difference (in abs. value) and $1 difference (in abs.). I deemed the rows that got a true value for both criteria as the correct matches.

    It wasn't pretty, but it got the job done.
    (correctly, I hope )

+ 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. [SOLVED] Creating lists based on matching criteria
    By Sam.T in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-27-2013, 11:59 PM
  2. [SOLVED] Deleting Duplicates Based on Multiple Criteria from Multiple Columns
    By Franklic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2012, 05:31 PM
  3. Replies: 1
    Last Post: 10-10-2012, 04:49 PM
  4. Merging multiple duplicates?
    By aeubanks in forum Excel General
    Replies: 4
    Last Post: 09-20-2012, 12:52 AM
  5. Merging two lists, finding and keeping only duplicates
    By SilverdaleJB in forum Excel General
    Replies: 3
    Last Post: 10-23-2010, 10:06 AM

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