+ Reply to Thread
Results 1 to 6 of 6

Look for multiple substrings in a sring

Hybrid View

  1. #1
    Registered User
    Join Date
    05-11-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Exclamation Look for multiple substrings in a sring

    Hi all,

    I have a worksheet that contains a list of keywords as well as a very long list of sentences.

    I am trying to build a very efficient methodology that would allow me to flag each sentence if at least one of the substring is found in its string.

    I am actually symplifying the question since I have many categorized list of substrings I would actually look for in separate columns.

    I have tried many methodologies such as having search functions with OR condition, Inxdex & match etc.... unfortunately all these formula take a very long time to process and I am looking for another solution that would compute much faster than this.

    Thank you,
    Kamn287

  2. #2
    Forum Contributor Mayda89's Avatar
    Join Date
    09-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Look for multiple substrings in a sring

    Hi and welcome to the forum,
    I think what you are looking for are SEARCH and FIND functions (the choice among these two will depend on your preference regarding to the CAPS)

    Hope this helps.
    Cheers
    If I have helped, Don't forget to add to my reputation (click on the star icon below the post).
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved).
    Use code tags when posting your code.

  3. #3
    Registered User
    Join Date
    05-11-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Look for multiple substrings in a sring

    Thanks Mayda89!

    The match doesn't have to be case sensitive. I guess I am struggling more with optimizing the solution than the actual logic. I used a few mothodologies that work they are just taking tooo much time to compute on excel.

    Kman287

  4. #4
    Forum Contributor Mayda89's Avatar
    Join Date
    09-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Look for multiple substrings in a sring

    Hi Kman,
    If you don't want it to be case sensitive, you should use the "SEARCH" function.
    Does it solve your problem?

    Cheers,

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Look for multiple substrings in a sring

    Give a try to this.

    Assuming that in B2 starts the list of sentences. In Sheet 2!(i named it "Key Words) in A2:A66 exist the KEY words..

    Then in C2 of your first sheet put this and copy down.

    =LOOKUP(2^15,SEARCH('Key Words'!$A$2:$A$66,B2),'Key Words'!$A$2:$A$66)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  6. #6
    Registered User
    Join Date
    05-11-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Look for multiple substrings in a sring

    Hi Fotis1991,

    Well, this is fast compare to what I initially tried.

    I will continue to test but it seems that this will perfectly fit my need!

    Thanks a lot!

+ 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