+ Reply to Thread
Results 1 to 3 of 3

Search cells for text (wildcard, list of values), return value based on found matches

  1. #1
    Registered User
    Join Date
    06-12-2014
    Posts
    5

    Search cells for text (wildcard, list of values), return value based on found matches

    Hello!

    I have run into this problem. I tried to figure this out my own but after hour, I need to admit defeat...

    Idea:
    There is a text cell which contains string of text. I want to search this cell based on list what I have defined.
    If there is a match, I want to return value - based on what it found.

    To illustrate what I mean, I have created an example workbook. Here is though more explanation to avoid misunderstanding

    I have list of search words and Column B is what I would like to return if that specific search word matches:

    00listvalues.PNG

    And here is the original data with comments, in column A I would like to have the formula where it would return country. "Desired outcome" is what should be correct, if I would perform this work manually.

    00listvalues2.PNG

    Attachment included:

    Lookup.xlsx

    Thank in advance for those who spend their time assisting me!

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Search cells for text (wildcard, list of values), return value based on found matches

    Maybe

    =INDEX(List!$B$1:$B$7,MATCH(TRUE,SEARCH(List!$A$1:$A$7,Data!C2)>0,0))

    ...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.
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    06-12-2014
    Posts
    5

    Re: Search cells for text (wildcard, list of values), return value based on found matches

    Quote Originally Posted by NeedForExcel View Post
    Maybe

    =INDEX(List!$B$1:$B$7,MATCH(TRUE,SEARCH(List!$A$1:$A$7,Data!C2)>0,0))

    ...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.
    It works like a charm! Thank You! Much appreciated!

    Reputation added

+ 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] 2 matches, search and return column values
    By madnezzsg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-23-2015, 04:10 PM
  2. Replies: 5
    Last Post: 09-01-2014, 08:05 AM
  3. [SOLVED] Search for the text in cell A1 in a list and remove the text if found in the list
    By kak0 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-24-2014, 11:01 PM
  4. Search named range for multiple matches to critera and return date & values
    By a.mack123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-18-2011, 10:07 AM
  5. search a cell for values in a range, return values found
    By carpe.cervisiam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-15-2011, 12:52 PM
  6. [SOLVED] Return text found in a search
    By Dave R. in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-12-2005, 04:06 PM
  7. Search column - return row found in long text string
    By JayL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2005, 12:06 AM

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