+ Reply to Thread
Results 1 to 16 of 16

Using VBA to search for a string (fuzzy logic)

  1. #1
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Using VBA to search for a string (fuzzy logic)

    Hey Guys
    I am hoping you can help

    Aim – Compare column A , with column B , if any row in column A is found column B then highlight that row in Column A
    I have attached a excel spreadsheet which will hopefully explain what i mean

    As you can see in column A, we have the three companies, but in column B we have four.

    In column A(Data to de-dupe) IBM Corp, And Burger King, would be the rows which need to be highlighted
    Data to De-dupe Real Data

    IBM Corp KFC
    Burger King Chelsea FC
    Arsenal IBM corportation
    Burger King Ltd


    I have found some VBA code, which i think will work a treat, however i need it slightly modified
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by masond3; 10-30-2013 at 07:01 AM. Reason: Attaching Excel Spreadsheet

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Using VBA to search for a string (fuzzy logic)

    Please use code tags when posting. I don't see any attachment.

  3. #3
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Re: Using VBA to search for a string (fuzzy logic)

    hi JOHN H. DAVIS
    I have re-attached file

    And i dont know how to code tag

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Using VBA to search for a string (fuzzy logic)

    See Forum Rule No. 3 for the code Tag Rule. 217 Posts and no one ever mention code tags to you before?

    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:

    Please Login or Register  to view this content.
    ... and appear like this when posted:

    [Select Code] copy to clipboard

    your code here ...
    and here ...
    and here

    You can also type the code tags in manually if you prefer. For more information about these and other tags, click here.

  5. #5
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Re: Using VBA to search for a string (fuzzy logic)

    HI John H. Davis

    Thank you for the heads up
    Hopefully my post now complies with the forum guidelines :P

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Using VBA to search for a string (fuzzy logic)

    Not the best way but Maybe:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Re: Using VBA to search for a string (fuzzy logic)

    Hi JOHN H. DAVIS

    thank you for providing some logic
    HOw can i apply the logic for all of column A & B instead of certain rows ?

    For eg the look up currently looking at values C3 - C6

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Using VBA to search for a string (fuzzy logic)

    Another option
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Using VBA to search for a string (fuzzy logic)

    Maybe:

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Re: Using VBA to search for a string (fuzzy logic)

    HI Ab33 and John H.Davis

    Thank you for your solutions

    I have a situation when i have "Eastern BMW & MINI" in column A, but i know there is a company called "Eastern BMW" in column B, but in both your examples, column A is not being highlighted, any ideas ?

    Regards
    D

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

    Re: Using VBA to search for a string (fuzzy logic)

    Is this how you wanted?
    Please Login or Register  to view this content.

  12. #12
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Using VBA to search for a string (fuzzy logic)

    "Eastern BMW" "Part Match "Eastern BMW & MINI" but not the other way round. In other words, you can find "Eastern BMW" in "Eastern BMW & MINI" but not "Eastern BMW & MINI" in "Eastern BMW"
    Last edited by AB33; 10-30-2013 at 09:04 AM.

  13. #13
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Using VBA to search for a string (fuzzy logic)

    Ditto Post #12.

  14. #14
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Re: Using VBA to search for a string (fuzzy logic)

    Hmm

    Thanks for the heads up your help is truly appreciated
    Regards
    D

  15. #15
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Using VBA to search for a string (fuzzy logic)

    Did you try Jindon's code?

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

    Re: Using VBA to search for a string (fuzzy logic)

    ................
    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. Fuzzy logic VLOOKUP (I think)
    By jimhegs in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-18-2013, 01:38 PM
  2. Fuzzy Logic Problem
    By flyme8 in forum Excel General
    Replies: 2
    Last Post: 05-25-2012, 04:39 AM
  3. Fuzzy Logic - search for similar values
    By mojo249 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2012, 02:11 PM
  4. Fuzzy logic
    By Mid61n05 in forum Excel General
    Replies: 2
    Last Post: 05-08-2009, 01:21 PM
  5. Can Excel 2k3 do fuzzy logic?
    By bouitac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2008, 03:35 PM

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