+ Reply to Thread
Results 1 to 6 of 6

Search multiple words in a single cell macro

  1. #1
    Registered User
    Join Date
    01-04-2016
    Location
    Philippines
    MS-Off Ver
    2007
    Posts
    42

    Search multiple words in a single cell macro

    Hi, is there a macro code that search for non chronological multiple words in a single cell?

    my code is this:

    Please Login or Register  to view this content.
    but this code only search for a single word


    Example: I typed: lazy walk

    it should find and filter the cell that contains this:

    the LAZY dog barks at the WALKing cat

    Pls help. Thanks
    Last edited by 6StringJazzer; 03-08-2016 at 12:50 PM. Reason: code taqs

  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: Search multiple words in a single cell macro

    If by multiple you mean two, maybe this can help? You just need the xlAnd operator

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-04-2016
    Location
    Philippines
    MS-Off Ver
    2007
    Posts
    42

    Re: Search multiple words in a single cell macro

    Hi John..

    Lazy and walk are just examples...

    My searchbox (named SEARCHBOX) is blank and it should search any word"s" typed in it

    Thanks
    Last edited by ruissu; 03-08-2016 at 12:46 PM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Search multiple words in a single cell macro

    Then maybe this:
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 03-08-2016 at 12:52 PM. Reason: Fixed error in array indices, see blue text
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Search multiple words in a single cell macro

    I am not citing you for one line of code in your OP but please use CODE tags in the future.

  6. #6
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Search multiple words in a single cell macro

    Try recording an Advanced filter if you may need more than two Criteria.

+ 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. Search multiple words in a single cell
    By ruissu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2016, 10:40 AM
  2. Search multiple words in a single cell
    By ruissu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2016, 10:38 AM
  3. [SOLVED] How to set multiple colors to words in single cell when character matched?
    By bezbid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2015, 01:41 PM
  4. Finding a Single name in Cell in a Cell with Multiple Names (words)
    By perm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-08-2014, 12:29 AM
  5. Macro to insert list of words in single cell
    By raghu n in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2013, 03:50 PM
  6. Setting up a search macro to find multiple words
    By O0J0E in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-19-2013, 05:14 AM
  7. [SOLVED] Macro that can search a database and highlight multiple words
    By Buster^ in forum Word Programming / VBA / Macros
    Replies: 5
    Last Post: 03-19-2013, 06:19 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