+ Reply to Thread
Results 1 to 12 of 12

VBA Filter: filter with keywords and attributes

  1. #1
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    165

    VBA Filter: filter with keywords and attributes

    Hy,

    I need a filter with VBA. I searched a lot in the forum and in the internet but I had no luck finding a macro that I need.
    In my worksheet I have a string. The macro should look if there are one or more keywords in the string. If there is one ore more, then filter the list "data" with the keywords.
    After that the macro should search the filtered results if there are attributes in the results and filter it again.

    I uploaded a worksheet with explanations. I hope you can help me.

    Thanks to everyone
    Kind Regards
    Roman
    Attached Files Attached Files

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA Filter: filter with keywords and attributes

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: VBA Filter: filter with keywords and attributes

    Hi karedog

    thanks a lot for your code. I have tested it and it works really great!!!!
    But when I expand the list with the keywords and the list with data with new entries, then there is nothing found...
    Kind Regards
    Roman

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA Filter: filter with keywords and attributes

    Please upload your workbook with these "keywords and new entries" addition that not worked.

  5. #5
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: VBA Filter: filter with keywords and attributes

    I found the error. The keyword must have an attribute.
    Can you please modify the code that results with only one or more keyword(s) and no matching attributes is also listed?
    THNAK YOU

  6. #6
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: VBA Filter: filter with keywords and attributes

    And there are no results when the attributes are like "50 mm" or just "50"...
    Attached Files Attached Files

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA Filter: filter with keywords and attributes

    Quote Originally Posted by moosmahna View Post
    I found the error. The keyword must have an attribute.
    But this is what you describe in your first file :
    Description on cell D16 : "search the string if there are attributes in the results after searching for keywords"
    And in your example, your manual output is B20:E22, you remove B11:E11 because it has no attributes expected (sweet white)

    ---------------------

    Here I make 2 separate subs, one is checking the keyword only, the other one is for checking with attributes

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: VBA Filter: filter with keywords and attributes

    Hi karedog,

    I have tested your new macros, but I got no results...

  9. #9
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: VBA Filter: filter with keywords and attributes

    Sorry, it works!!! I have forgotten to save the file.

    It works really great. Thanks again. But can you help me modify the code, that the macro takes the string and searches if it contains values from the data-table?
    No need of keywords. I found out, that in my list are too many keywords and some of them are written wrong.

    THANK YOU AGAIN!!!

  10. #10
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA Filter: filter with keywords and attributes

    Please Login or Register  to view this content.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  11. #11
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Austria
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: VBA Filter: filter with keywords and attributes

    Hy karedog.

    THANK YOU VERY VERY MUCH!!!! THATS PERFECT!!!

    Kind Regards
    Roman

  12. #12
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: VBA Filter: filter with keywords and attributes

    You are welcome, glad to help.

    Regards

+ 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] Using Array(s) to filter 13k+rows with 600+ keywords
    By robkrouse in forum Excel General
    Replies: 5
    Last Post: 01-31-2016, 04:06 AM
  2. [SOLVED] Excel 2007-Adv Filter Copy and Loop with Nested Autofilter Using Values from Adv Filter
    By Southfish in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2014, 02:07 AM
  3. Need to filter a report filter based on the previous filter
    By elliotencore in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-28-2014, 07:44 AM
  4. [SOLVED] Filter for keywords
    By Kmarginal in forum Excel General
    Replies: 7
    Last Post: 01-10-2013, 08:53 AM
  5. command to filter multiple columns and search for words containing keywords
    By melvyndb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2012, 09:37 PM
  6. Filter several pivot tables by one programmed date range filter in Excel 2003
    By olewka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2011, 11:49 AM
  7. How to filter 100's of keywords in one go?
    By ramki in forum Excel General
    Replies: 1
    Last Post: 03-25-2009, 02:28 AM

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