+ Reply to Thread
Results 1 to 4 of 4

Search text string in one cell from a column of cells

  1. #1
    Registered User
    Join Date
    07-15-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    6

    Search text string in one cell from a column of cells

    I have 5 cells with text in them (Column C), I want to know if any of the words in column C can be found in A2, A3, A4, etc.

    I.e. in the below example I want the column B to return the following values:

    A-----------------------B-----------------------C
    General INC------True-------------------FILE
    General CORP--True------------------CORP
    General-----------False----------------- INC
    Random word---False---------------- KNOW
    -----------------------------------------------EXCEL

    What is the formula I should use in column B?

    thanks a lot...
    Last edited by elfnt; 07-16-2010 at 09:25 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Search text string in one cell from a column of cells

    Try:

    =SUMPRODUCT(--(ISNUMBER(SEARCH($C$1:$C$5,A2))))>0

    adjust ranges to suit.
    Last edited by NBVC; 07-15-2010 at 09:22 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-15-2010
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Search text string in one cell from a column of cells

    It didn't work. I've attached the sheet with the formula inputted and it returns TRUE on any text string.
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Search text string in one cell from a column of cells

    That is because you have blanks in the C1:C5 range...try:

    =SUMPRODUCT(--($C$1:$C$5<>""),--(ISNUMBER(SEARCH($C$1:$C$5,A1))))>0

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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