+ Reply to Thread
Results 1 to 12 of 12

keyword filtering

  1. #1
    Registered User
    Join Date
    11-14-2008
    Location
    Indonesia
    Posts
    7

    keyword filtering

    Hi all,
    I'm quite newbie for VBA for excel, my friend asked me a favor to filter the data on his excel, so when he enter some keyword, the table would sorted (only show the row that have that keyword), and if possible that he enter it few keyword.

    keyword example VB, oracle

    table example

    project description
    school making oracle dtbase
    <blank> VB project
    java database

    when he enter vb, oracle then the table become

    project description
    school making oracle dtbase
    <blank> VB project

    any idea how? or someone would mind to give me example/make what the macro would like?
    since i never use VB before it really difficult for me to built it from scratch..

    thanks for your help
    Last edited by genki; 11-17-2008 at 11:31 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Genki,

    Welcome to the Forum!

    Your name Genki in Japanese means to be healthy and it good spirits. I hope that your are. If you have a workbook with the data, please post it. It will amke it easier and faster to answer your question.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    11-14-2008
    Location
    Indonesia
    Posts
    7
    Quote Originally Posted by Leith Ross View Post
    Hello Genki,

    Welcome to the Forum!

    Your name Genki in Japanese means to be healthy and it good spirits. I hope that your are. If you have a workbook with the data, please post it. It will amke it easier and faster to answer your question.

    Sincerely,
    Leith Ross
    I'm glad u know the meaning of my nick
    here the sample of the file, usually it would be longer, and he said it would be different each week (the lenght) as you can see, there a lot keyword everywhere
    like oracle, not only oracle but there oracle project, oracle bundled, so when he input oracle all the row that have that word showed..
    any help/sample? I'm really2 thankful..
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Genki,

    Will these keyword be under a particular column heading or do you want to search all columns for the keyword?

    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    11-14-2008
    Location
    Indonesia
    Posts
    7
    i think all coloumn, but the result base one row that have that keyword
    is that possible? i havent get any luck finding sample of that kind of macro

    i think it's like using Find (ctrl+F) but it could filter the data


    thanks,
    Last edited by genki; 11-15-2008 at 02:58 AM. Reason: adding some text

  6. #6
    Registered User
    Join Date
    11-14-2008
    Location
    Indonesia
    Posts
    7
    or if the filter not possible/too hard, how about change it to copy paste to a new worksheet?

    so copy the row that have that keyword into new worksheet, and it could be multiple keyword, is that possible?

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Genki,

    It would be easier to place the filtered data on a separate worksheet. When a match is made will the entire row be copied to the new sheet or only certain columns?

    Sincerely,
    Lieth Ross

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Genki,

    I have one other question. Where will the words be located that the filter will use?

    Sincerely,
    Leith Ross

  9. #9
    Registered User
    Join Date
    11-14-2008
    Location
    Indonesia
    Posts
    7
    Quote Originally Posted by Leith Ross View Post
    Hello Genki,

    I have one other question. Where will the words be located that the filter will use?

    Sincerely,
    Leith Ross
    basically on input box, but if can't it's ok using static keyword (put inside the macro) mostly only around 6 keyword

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Genki,

    It took some time to put this together. Here is what the macro does...

    1) You call it by using the keys Ctrl+K.
    2) An input box will ask you for the keywords you want to look for. The search ignores case, but spaces are not. Separate multiple search items with a comma.
    3) Wildcard characters * and ? can be included when searching.
    4) The keywords are copied to the Results worksheet and each cell that a keyword was found in is highlighted in yellow.

    Here is the macro code for those who are interested...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    11-14-2008
    Location
    Indonesia
    Posts
    7
    OMG thanks so much Leith!!!
    how can I thank u???

  12. #12
    Registered User
    Join Date
    11-27-2011
    Location
    Davao, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: keyword filtering

    thank you very much leith!! I am a newbie to excel programming and eager to learn,..You inspire someone like me. Thank you for your unconditional sharing..

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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