+ Reply to Thread
Results 1 to 7 of 7

Finding a text string in a column

  1. #1
    Registered User
    Join Date
    09-29-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    91

    Finding a text string in a column

    Hi,

    I am trying to filter out entries which contain a particular text in a string. In the spreadsheet attached, the column contains description of different problems. I need to a macro or a function or any way to filter out only the cells which contain the word "pins" in its description.

    Is this possible?
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: Finding a text string in a column

    Use AutoFilter with a Custom Filter: Contains: "pins" no quotes

    See your updated workbook

    Regards
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-29-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Finding a text string in a column

    That was very helpful. Is it possible that I can check for the existence of more than one word in a string?

    That is if I want to check for the existence of two words "pins" and "bent"

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Finding a text string in a column

    The two word situation can be done with AdvancedFilter.
    The attached has a criteria range in G1:G3
    Attached Files Attached Files
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Forum Contributor
    Join Date
    09-18-2008
    Location
    india
    Posts
    158

    Re: Finding a text string in a column

    Hi Guys,

    What happens if you have blanks in between....? Auto filter will not work...correct me if iam wrong.


    Regards,
    Shekar.

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Finding a text string in a column

    What do you mean by "blanks in between"?

    If any row in the criteria range is blank, every row in the data set meets the "conditions" of that row, so the entire data set is shown. Therefore there should be no blank rows in the criteria range.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: Finding a text string in a column

    If the two words are in the same column, you can use AND in your custom (AutoFilter) filter.

    Regards

+ 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