+ Reply to Thread
Results 1 to 3 of 3

Find array value within a string

Hybrid View

  1. #1
    Registered User
    Join Date
    06-24-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Find array value within a string

    This is great thank you. Is there a way to adjust it so that, instead of a rendering a true/false, the formula renders the matching value from the D1:D2 table of "keywords"?

    Quote Originally Posted by DonkeyOte View Post
    If we assume your strings are in Col A and your table of "keywords" is say D1:D2 then

    B1: =ISNUMBER(LOOKUP(9.99E+307,SEARCH($D$1:$D$2,$A1)))
    copied down

    replace SEARCH with FIND if you require case sensitivity
    Last edited by DonkeyOte; 06-25-2011 at 03:58 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Find array value within a string

    Welcome to the Board. Please ask questions in your own thread rather than the thread of another member. Given first post etc... I have on this occasion moved your post for you to a new dedicated thread.

    In answer to your question:

    =LOOKUP(9.99E+307,SEARCH($D$1:$D$2,$A1),$D$1:$D2)
    Note that if no keyword is found the above will return an #N/A error - if you wish to handle that you can either via IFERROR or outer LOOKUP - given use of XL2010 the former would be the more logical approach.

  3. #3
    Registered User
    Join Date
    06-24-2011
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Find array value within a string

    Thank you very much! Of course it worked just fine. No problem for starting my own thread for new questions.

    Regards
    Last edited by DonkeyOte; 07-05-2011 at 04:40 AM. Reason: removed unnecessary quote

+ 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