+ Reply to Thread
Results 1 to 6 of 6

Help! Count how many words in a sentence match a dictionary of words

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    Washington, D.C.
    MS-Off Ver
    Excel 2007
    Posts
    5

    Help! Count how many words in a sentence match a dictionary of words

    I have a sheet with a small dictionary of words and then a sheet with a bunch of sentences. I'm trying to figure out how to go through each sentence and count how many of the words in the dictionary show up in that sentence. I tried using the FIND method within a loop with a count but it's not working.... Any ideas?

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Help! Count how many words in a sentence match a dictionary of words

    If in sheet1 Column "A" you have your Dictionary of words and in sheet2 column "A" you have your sentences.
    Then when you have run this code, column "B" of sheet 2 will be filled with the words from the Dictionary that are Found in column "A" of sheet2 and column "C" will be filled with the count.
    Please Login or Register  to view this content.
    Regards Mick

  3. #3
    Registered User
    Join Date
    03-04-2013
    Location
    Washington, D.C.
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Help! Count how many words in a sentence match a dictionary of words

    Thanks for the help!
    Is there any way to make it so that it counts those terms for each sentence (so there would be a count associated with each cell rather than an overall count for the spreadsheet)?

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Help! Count how many words in a sentence match a dictionary of words

    Results now against each row of sheet2, Starting column "B".
    Please Login or Register  to view this content.
    Regards Mick

  5. #5
    Registered User
    Join Date
    03-04-2013
    Location
    Washington, D.C.
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Help! Count how many words in a sentence match a dictionary of words

    How would I go about doing this with 2 separate list of terms without doubling them on top of eachother?

  6. #6
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Help! Count how many words in a sentence match a dictionary of words

    Can you show a simple example of your data lists with the expected results.

+ 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