+ Reply to Thread
Results 1 to 8 of 8

Compare 2 columns and return the best match

  1. #1
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    Compare 2 columns and return the best match

    Belated Merry Christmas everyone!

    I've been racking my brains about this problem but I can't find a solution, and I am freaking out a bit.

    Please refer to the attached file.

    On the problem tab, there are 3 columns: Order List, Item per Item List , and Item List .

    Basically, I am hoping for this to happen ... for each cell on the Order List column, refer to the Item List column and choose the best match and put it into the Item per Item List column. The desired result is in the Result tab.

    The problem is that the Order List column has all this unnecessary stuff that that makes it hard to match. If I do it manually, I can determine "Okay, there's a "Blackberry" and a "9900" in there so it should be a Blackberry 9900 per the Item List." But I'm having a really hard time translating that into a formula or vba code.

    Anyways, I would really appreciate some assistance on this. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,085

    Re: Compare 2 columns and return the best match

    There is a message like "The file is corrupt and cannot be opened"
    can you load it again

  3. #3
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    Re: Compare 2 columns and return the best match

    Hmm that's strange. I can download the file just fine.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,085

    Re: Compare 2 columns and return the best match

    Try next code and comment
    Please Login or Register  to view this content.
    Last edited by PCI; 12-27-2013 at 06:18 AM. Reason: Code updated

  5. #5
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: Compare 2 columns and return the best match

    An other alternative

    Pls see the link bellow
    http://www.ncorpus.com/aydingurel/co...zyvlookup.html

    and then, use the following formula for cell B2
    =FUZZYVLOOKUP(A2,$C$2:$D$6,1,0.2)

    & copy to cells: B3, B4,...
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Compare 2 columns and return the best match

    Try the attached.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,085

    Re: Compare 2 columns and return the best match

    After additional tests done previous code has been updated
    Please Login or Register  to view this content.
    Last edited by PCI; 12-27-2013 at 07:05 AM. Reason: Update code

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Compare 2 columns and return the best match

    Found a bug and fixed.
    Attached Files Attached Files

+ 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. Replies: 0
    Last Post: 05-22-2013, 04:40 AM
  2. [SOLVED] Compare data in columns of two worksheets and return value if match.
    By Zoediak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2013, 10:38 AM
  3. Index/Match to return values to compare
    By Iptgfs in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-01-2013, 12:39 PM
  4. How to compare columns and return one value if they match
    By louise0502 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-16-2013, 11:10 AM
  5. Replies: 1
    Last Post: 10-04-2012, 02:31 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