Results 1 to 6 of 6

Help needed with code to match word and phrase and return the results

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-17-2014
    Location
    london
    MS-Off Ver
    365
    Posts
    398

    Help needed with code to match word and phrase and return the results

    Dear All

    I was wondering whether someone can help me with the following problem:
    I’m not sure whether this is possible at all. I have attached a basic sample spreadsheet to illustrate what I want to do.

    I have a spreadsheet which has customer names and comments they have made.

    What I need to help with code to look at the Dic sheet and look at all entries in Column A and then search in Sheet Com in Column B and see whether the words or phrases which are in Sheet Dic (Col A) exits in the comments.

    If they exist the count the number of times each word or phrase has been repeated throughout the sheet Com Col B and return the values of Col A , Col B and Col C for each time the criteria is met.

    i.e.
    look at all column B where there is an entry, look at those words and phrases in each of the cells and compare them to words/phrases in Sheet Com Col B. Then return the count of the matches in Sheet Results. i.e if rude and pushy is matched in column B2 in Sheet Com then in sheet Results enter the number of occurrences in column O and copy the row where the match was made in Col A of sheet Results. In attached example in sheet Com, first comment has rude and pushy so occurrences of rude and pushy = 1 which can be entered in sheet results in Col A and then copy the whole of row A in Sheet Results from the first available row which in this case will be A2.

    Then look at the next row in Com and it contains the word rude so occurrence of rude is now =2 and then the whole of the row will be copied to sheet results starting from A3 and col O in results will be updated for rude.

    Sorry if this is long winded but I just wanted to try to explain as clearly as I could. Attached is a sample sheet. My real worksheet has over 20000 comments and I built the dictionary of word and phrases as time goes by in Sheet Dic
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel vba code to place text after a specific phrase found in word document
    By Madhut in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-05-2017, 05:44 AM
  2. Using VLOOKUP to find a specific word in a phrase and return a value
    By arnagas in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2016, 11:09 AM
  3. Include random word from the word list with a phrase as suffix or prefix
    By faizzsheikh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-10-2016, 05:53 AM
  4. Replies: 2
    Last Post: 10-09-2014, 05:14 AM
  5. Look up formula to return multiple results-help needed
    By Narelles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-08-2013, 08:23 PM
  6. Formula needed to return multiple results based on one reference
    By AMSBenji in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-08-2013, 12:15 AM
  7. Function to return text from phrase X to phrase Y
    By razr in forum Excel General
    Replies: 3
    Last Post: 05-06-2009, 05:52 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