+ Reply to Thread
Results 1 to 11 of 11

Delete words within phrase from list of words

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    IA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Delete words within phrase from list of words

    I have a list of phrases. I have a second list of specific words that I need to delete (replace with "") from within each phrase. For example;

    Phrases
    Dogs for sale in Virginia
    Dogs in lower Virginia
    Virginia dogs sale internet

    List of words to delete
    Dogs
    Internet
    Lower
    For
    etc...

    Ultimately reducing the phases to words that are not within the list of words to delete.

    Ideally, I would like to do this formula/s as I am not as versed with vba in excel -- but am open to vba if that is the only way to do it.

    Can somebody please point me in a direction to research solutions. Thanks

  2. #2
    Registered User
    Join Date
    03-30-2014
    Location
    Suzhou,China
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Delete words within phrase from list of words

    I'm afraid that formula could not solve it.

    try this vba function:

    Please Login or Register  to view this content.
    Welcome to China,Welcome to Suzhou...And,我是来学英文的。

  3. #3
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Delete words within phrase from list of words

    Try this :
    =SUBSTITUTE(A1,{"Dogs","Internet","Lower","For"},"")
    Replace A1. Add/delete words from the array.

  4. #4
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Delete words within phrase from list of words

    Try this :
    =SUBSTITUTE(A1,{"Dogs","Internet","Lower","For"},"")
    Replace A1. Add/delete words from the array.

  5. #5
    Registered User
    Join Date
    04-04-2014
    Location
    IA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Delete words within phrase from list of words

    That's what I was afraid of. I fairly good at vba for access but have never used in in excel. Not sure what to do with the code you gave and how to integrate it

  6. #6
    Registered User
    Join Date
    04-04-2014
    Location
    IA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Delete words within phrase from list of words

    Thanks amphinomos. I thought of the substitute command, however; my list of words to delete are not finite to 4 specific words-- the list is over 200 words and I want to have the ability to add to it.

  7. #7
    Registered User
    Join Date
    03-30-2014
    Location
    Suzhou,China
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Delete words within phrase from list of words

    Quote Originally Posted by El Cosmos View Post
    That's what I was afraid of. I fairly good at vba for access but have never used in in excel. Not sure what to do with the code you gave and how to integrate it
    Hi,

    press ALT+F11 ,Insert==>Module,copy the code and paste it in the blank.

    then,in your Spreadsheet,enter the formula like this :

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    "A1" is the phrases and "$C$1:$C$4" is the List of words to delete.

    sorry for my poor english.

    Regards,
    wcymiss

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Delete words within phrase from list of words

    Quote Originally Posted by amphinomos View Post
    Try this :
    =SUBSTITUTE(A1,{"Dogs","Internet","Lower","For"},"")
    Replace A1. Add/delete words from the array.
    SUBSTITUTE function does not support multiple criteria.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  9. #9
    Registered User
    Join Date
    04-04-2014
    Location
    IA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Delete words within phrase from list of words

    Hmmm. I set it up as you described but it returns #NAME?

  10. #10
    Registered User
    Join Date
    03-30-2014
    Location
    Suzhou,China
    MS-Off Ver
    Excel 2003
    Posts
    41
    Quote Originally Posted by El Cosmos:3650154
    Hmmm. I set it up as you described but it returns #NAME?
    Hi,
    you should enable macros.

    plz see this:http://m.videojug.com/film/how-to-en...acros-in-excel

  11. #11
    Registered User
    Join Date
    04-04-2014
    Location
    IA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Delete words within phrase from list of words

    Quote Originally Posted by wcymiss View Post
    Hi,
    you should enable macros.

    plz see this:http://m.videojug.com/film/how-to-en...acros-in-excel
    I have saved the file as macro enabled and verified that macros are enabled in the trust center. Still no luck though

+ 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. Replies: 3
    Last Post: 08-14-2013, 10:38 AM
  2. Subsitute or Find/Replace words in a phrase
    By Crhodes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2013, 09:13 PM
  3. Replies: 3
    Last Post: 11-28-2012, 04:00 AM
  4. Find phrase and erase all other words
    By csch123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-18-2012, 02:07 PM
  5. Replies: 1
    Last Post: 04-04-2012, 07:15 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