+ Reply to Thread
Results 1 to 3 of 3

Searching a string within a string

  1. #1
    Registered User
    Join Date
    09-09-2010
    Location
    Philadelphia PA
    MS-Off Ver
    Excel 2007
    Posts
    39

    Searching a string within a string

    I have a task at hand that I couldn't figure out how to do... There are three columns and two parts to the task

    1. Query all the strings in column B into cell "A2" and find if anyone matches it.
    2. If there is a match then return the corresponding value from column "C"

    e.g. Cell A4 has the string in cell b12 and the outcome should be C12.


    There is no defined starting poing and marker, so I can't use Find, Left or midle function.

    I know the second part could be done with Vlookup as long as part 1 works. Unfortunately, thats where I am stuck.

    I'd very much appreciate if someone can help me with it.

    Thanks,
    H
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Searching a string within a string

    The formula to do what you're asking for (check to see if a cell in column A contains any of the values in column B and, if it does, return the value from the same row in column C) is:

    =IFERROR(INDEX($C$2:$C$824,MATCH(TRUE,INDEX(ISNUMBER(FIND($B$2:$B$824,A2)),0),0)),"")

    But that doesn't match your example - how does the value of A4 (07OEDOC220) contain the string from B12 (ABSC)?

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Searching a string within a string

    maybe ..

    Please Login or Register  to view this content.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

+ 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