+ Reply to Thread
Results 1 to 3 of 3

Find, List and Count All Words within a Text String

Hybrid View

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    Miami, FL
    MS-Off Ver
    Excel 2010
    Posts
    1

    Find, List and Count All Words within a Text String

    Hi Everyone,

    Please help, as I cannot find a clear cut answer. Thus, I have uploaded my spreadsheet.

    I have a column of text strings on Sheet1, Column A, which I need to check for the presence of keywords listed on Sheet2, Column A

    So if any word from the keyword list on Sheet2, Column A is found in, say, cell A2 of Sheet1, the cell to its right (B1) should have a formula to display the count of keywords found in A2. I also would like to see each keyword identified either through a highlight or a list. I need the formula to NOT be case sensitive and the match does not have to be for whole words).

    I have also attached an example of the spreadsheet.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Find, List and Count All Words within a Text String

    This formula will at least give you the number of keywords in the text string.
    {=COUNT(IF(SEARCH('Words Positive and Negative'!$A$1:$A$2329,Transcripts!A1,1)<>0,1))}
    Please note that this formula is an ARRAY formula, you must hit the keys CTRL+SHIFT+ENTER to exit the formula to make it work.
    In order to highlight those specific words, you'll probably need VBA macro.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    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
    53,048

    Re: Find, List and Count All Words within a Text String

    If your text is in A1, use this to break it apart, copied across...
    =TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",LEN($A1))),LEN($A1)*(COLUMN()-2)+1,LEN($A1)))

    Note, this is not my formula, a really smart member cooked this up and I saved it for just such a request
    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

+ 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] Find text string exist in cell from keys words
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-11-2013, 01:56 AM
  2. Replies: 4
    Last Post: 04-27-2012, 06:38 AM
  3. Replies: 1
    Last Post: 04-04-2012, 07:15 PM
  4. Count spaces between last two words in a text string
    By mkvassh in forum Excel General
    Replies: 4
    Last Post: 10-26-2011, 03:33 AM
  5. Find the last occurence of a text string in a list
    By NDBC in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-14-2009, 04:22 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