+ Reply to Thread
Results 1 to 6 of 6

Partial string lookup

  1. #1
    Registered User
    Join Date
    01-02-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Partial string lookup

    Sample File here or Observation .xlsx

    What I need to do is search the text strings in the "Evidence" column, match any words within the "Keywords" sheet, and then return the column heading (from the Keywords sheet) to the "Domain" column in the "Evidence" sheet.

    Any ideas? I feel like I do not know enough of the terminology to be able to search properly (been trying), so if you can point me in the right direction, I would appreciate it.
    Last edited by jprobst; 12-08-2015 at 07:05 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Partial string lookup

    Please upload your file to the forum. Not all members are able - or willing - to access file-hosting sites
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Partial string lookup

    see attached my attempt on this....

    i had to change the Keywords section and fill all the blanks with "zzzzzz"
    the reason for this was because it would return blanks as found keyword (which is correct)

    CSE formula was used...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    the formula looks for "evidence" in keywords!A2:h20 and if it returns a zero (which means no matches) it will make the cell "N/A" <<change this to whatever you want
    if it is not 0 then it uses index formula to match against column

    now...if more than one keyword is found
    it will return the domain closer to the left regardless of the order of words in evidence
    Attached Files Attached Files
    Last edited by humdingaling; 12-08-2015 at 09:11 PM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    01-02-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Re: Partial string lookup

    Awesome that works.
    What if I want to return ALL domains that apply? For instance: 2A, 3B

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Partial string lookup

    Quote Originally Posted by jprobst View Post
    What if I want to return ALL domains that apply? For instance: 2A, 3B
    If you are open to a VBA solution this User Defined Function by tigeravatar does that. It is already installed in the VBA editor of the attached. To see it open the VBA editor (keyboard shortcut is Alt + F11). In order to do it yourself copy the below, click Insert in the VBA editor then Module. A code module appears. Paste the code into that window.

    Please Login or Register  to view this content.

    Then this array-entered formula (Ctrl + Shift + Enter) in C2 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by FlameRetired; 12-08-2015 at 11:53 PM. Reason: clarification
    Dave

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Partial string lookup

    it would be extremely difficult to do it in with the method i proposed

    UDF method flame has provide would be the optional method in my opinion

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Lookup Partial String Matches
    By rtabaldi in forum Excel General
    Replies: 5
    Last Post: 04-02-2014, 09:40 PM
  2. Partial String Lookup between two lists of Data
    By rileyfairs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2014, 06:05 PM
  3. Reverse Table Lookup using a partial string
    By pat3white in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-27-2013, 01:35 PM
  4. Complex matching with indirect lookup based on partial string match
    By jdcb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-17-2012, 08:19 AM
  5. SUMPRODUCT with "*" partial string lookup
    By timjames in forum Excel General
    Replies: 8
    Last Post: 09-02-2011, 08:54 AM
  6. Getting info from another workbook based on partial string lookup
    By 96HawkCnvt in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-10-2010, 03:33 PM

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