+ Reply to Thread
Results 1 to 9 of 9

Display All results from word list that appear in cell

  1. #1
    Registered User
    Join Date
    12-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    28

    Display All results from word list that appear in cell

    Hi

    I am new to Excel Forum and have posted on http://www.excelforum.com/excel-form...ding-text.html regarding a modified version of what they have done

    Please can someone advise as to how to do this query but show all results found rather than just one result

    that thread is showing as solved so I didn't know if it would ever be responded to.

    Thanks

    Samuel

    As the below


    ------------------------------------------------------------------------

    Hello Everyone

    This formula is a great help to me also however I do have a question

    I want the result to be able to show multiple terms from the search terms and index.

    for example

    Bob's BMW and Ford

    Result would be

    BMW,Ford

    Rather than just Ford

    Is this possible?

    Any help would be greatly appreciated and beneficial

    Thanks

    Samuel

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,719

    Re: Display All results from word list that appear in cell

    You did right in starting your own thread - you should not hijack someone else's thread by asking your own questions there (see the forum rules). However, it would also be helpful if you put together your own sample workbook and post it in this thread. Indicate clearly what you have and what you would like to achieve (e.g. by having a BEFORE and AFTER sheet).

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    28

    Re: Display All results from word list that appear in cell

    Hi Again

    Thanks for such a quick response

    No problem at all

    Please see Column B

    This shows if a word appears from the list in column F but only shows the last result which appears.

    I wish for the formula to be able to show all results

    The formula used is =IF(SUMPRODUCT(COUNTIF(A4,"*"&$F$2:$F$6&"*"))=0,"None Found",INDEX($F$2:$F$6,MATCH(TRUE,INDEX(ISNUMBER(SEARCH($F$2:$F$6,A4)),),0)))

    For example the list is

    BMW
    Ford
    Honda
    Mercedes
    Toyota

    and it is searching

    Bob's Ford BMW
    Mercedes And Honda of ABC
    Smith BMW
    Ford USA
    Tim's Honda
    Randy's Toyota Dealer
    BMW Superstore


    Currently the results would be as follows

    BMW
    Honda
    BMW
    Ford
    Honda
    Toyota
    BMW

    but I would want the results to be

    Ford,BMW
    Mercedes,Honda
    BMW
    Ford
    Honda
    Toyota
    BMW

    Therefor showing all of the words which occur in the list.

    I have attached the excel sheet for reference

    Thanks
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    28

    Re: Display All results from word list that appear in cell

    Can Anyone assist with this if possible please?

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Display All results from word list that appear in cell

    You need to use a VBA user defined function to do this.

    Are you familiar with using macros or VBA code?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    12-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    28

    Re: Display All results from word list that appear in cell

    Hi There

    Thanks for responding,

    I honestly would not know where to begin in doing that I am afraid

    is there anything you could assist with in getting us there?

    Thanks

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Display All results from word list that appear in cell

    Try this...

    Open the file in which you want to do this.

    Press the key combination of Alt+F11 to open the Visual Basic Editor

    Goto the menu Insert > Module

    Copy the VBA code from the link below and paste it into the window that opens on the right side of the screen.

    http://www.excelforum.com/showthread...=1#post3096647

    Press the key combination of ALT+Q to close the Visual Basic Editor and return to Excel.

    Enter this array formula** in C2:

    =IF(SUM(COUNTIF(A2,"*"&$F$2:$F$6&"*")),concatall(IF(ISNUMBER(SEARCH(F$2:F$6,A2)),F$2:F$6,""),", "),"None Found")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down as needed.

    You'll have to save the file as a macro enabled file in the *.xlsm format.

  8. #8
    Registered User
    Join Date
    12-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    28

    Re: Display All results from word list that appear in cell

    Hi Again

    That is perfection its self

    Thank you ever so much, it seems to work perfectly!

    You have saved me a great amount of time, it is extremely appreciated!

    This issue is most certainly solved!

    Thanks again!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Display All results from word list that appear in cell

    You're welcome. Thanks for the feedback!

    If your question has been answered please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools>Mark this thread as solved.

+ 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. Using Lookup or match to display a list of results from a range of cells
    By jshaw82 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-14-2013, 05:55 PM
  2. Display most current answer in monthly results list
    By thymekpr in forum Excel General
    Replies: 2
    Last Post: 06-24-2010, 09:25 AM
  3. Count in filtered list and display results in table on right of data
    By raydaw in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2009, 05:14 AM
  4. How to display multiple results from a list?
    By oliccm in forum Excel General
    Replies: 8
    Last Post: 01-26-2009, 02:23 PM
  5. Search List and display results
    By morjo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2008, 02:32 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