+ Reply to Thread
Results 1 to 4 of 4

Thread: 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 Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    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.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  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 Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    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
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ 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.2.0