Matching keywords with Product Description

  • Hi everyone,


    I have a database on Excel that is basically a compilation of three information from different sectors of the economy: Product Description, Product Code and Supplier. My aim is to extract from that worksheet (to another one) the information regarding only the sector that I need. Unfortunately, there is no filter whatsoever and the only way for me to identify the products that I want is by the Product Description, that has some keywords associated with the sector that I'm interested. I created a list of keywords that the Product Description might have and also a macro to go through this list and match those Product's Descriptions that contain it. After it matches something, it creates an entry on the new list that I'm building (to have only the products that I need).


    The code is the one that follows:



    Where:


    Line_1 = first line of the data base
    Line_2 = first line of keywords' list
    Line_3 = first line of the new list (with the products that I want)


    WksInput = worksheet of the data base
    WksOutput = worksheet of the new list


    As you guys can see, it's an awful code (I have no experience at all at programming). It works, but it's a lot slow and it must have a simpler way of doing this. I used Do While because I'll be updating the database and the keywords' list regularly, so I thought it was a good idea for saving time on the future.


    Could you guys help me? Any tips will be welcome. Also, I hope I've made myself clear. I can try detailing a bit more if needed.


    Thanks a lot!!!

  • Re: Matching keywords with Product Description


    Hi Fuzz-Head,


    Thank you for the reply!! Please find attached the database with the new list I'm trying to create. I used the same specification as in the OP. Just for you to know, there are 23k+ entries and they are in portuguese, don't know if it's going to be of any problem to you. I hope you can work something out..


    Again, thank you for the support!



    forum.ozgrid.com/index.php?attachment/69223/

  • Re: Matching keywords with Product Description


    So lets see if I have this correct.. On your WksOutput sheet Column F starting on Row 3, you want to put some names of some keywords down that column.


    You then want to search through WksInput Sheet and on any match's in either Column B or Column D return those results in the order of Columns B thru D on the WksOutput correct?

  • Re: Matching keywords with Product Description


    Yes, that's correct! But I want to search the keywords only on Column D (Product Description), Column B is not needed. Also, I forgot to add a remove duplicates mechanism on the end of the macro, since I believe there'll be duplicates on the list if I input two different keywords that appear on the same Product Description..

  • Re: Matching keywords with Product Description


    Try this and see if this does what your looking for.



  • Re: Matching keywords with Product Description


    That's exactly it, Fuzz-Head!!! Thank you so much for your help!!!


    It's returning some type of error when I have just one keyword on the list, but since that's not going to be the case, that's fine. Also, I'll try to understand your code better for me to change it in case it's needed.


    But again, thank you very much! I'll owe you one ;)


    Bests,

  • Re: Matching keywords with Product Description


    Sorry bout that, Here is the code modified for single word lookup.


    Keep in mind, that partial match's are found which I think is what you wanted. So only typing in a few letters for a word for a match will find more results


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!