+ Reply to Thread
Results 1 to 11 of 11

Thread: How to delete composed keywords separated by comma into a cell?

  1. #1
    Registered User
    Join Date
    01-23-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Question How to delete composed keywords separated by comma into a cell?

    Hi folks,

    Lets suppose I have the cell A1 with 100 words or more separated by comma, but the words can be composed word or double words such as "jump up", "Old age","sunny day", or more "holding a face", but I want to find these composed words or double/triple+ words with space that are between commas, and delete them and just leave the single words. So, as example let's suppose my cell A1 was as:

    [A1] word1, jump up, word3, word4, Old age, word6, Sunny day, holding a face,...word100

    Want the result as

    [A1] word1, word3, word4, word6, ...word100

    Is there some way to create a formula on B1 to get the result above or is it possible to put them within double-quotes as shown below:

    [A1] word1, "jump up", word3, word4, "Old age", word6, "Sunny day", "holding a face",...word100


    Thanks in advance.
    Last edited by lucato; 02-04-2012 at 03:57 PM.

  2. #2
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: For Experts: How to delete composed keywords separated by comma into a cell?

    Hi lucato.

    Is the same question with this??...


    http://www.excelforum.com/excel-gene...to-a-cell.html
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  3. #3
    Registered User
    Join Date
    01-23-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: For Experts: How to delete composed keywords separated by comma into a cell?

    No, it is different from that post subject, but has the same question in the thread to member that was helping me with the other issue. So, how it isn't the subject of that title was created a new one.

  4. #4
    Valued Forum Contributor Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    685

    Re: How to delete composed keywords separated by comma into a cell?

    You can do it directly on the cell by applying Find & Replace. First put a <comma><space> before the first word, and a <comma><space> after the final word. Highlight cells A1 and A2 (so that this will not affect other cells), then CTRL-H, and then in the dialogue box:

    Find what: <comma><space><asterisk><space><asterisk><comma><space>, i.e. ", * *, " without the quotes
    Replace with: <comma><space>, i.e. ", " without the quotes
    Click Replace all

    this will remove all words containing one or more spaces within the text. You can then delete the <comma><space> before the first word and after the last word.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    01-23-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: How to delete composed keywords separated by comma into a cell?

    Hey Pete great trick as non-formula, thanks for your tip.

    It is a pity, that the Replace with doesn't accept "*" as wildcard character.

  6. #6
    Registered User
    Join Date
    01-23-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: How to delete composed keywords separated by comma into a cell?

    Hi Pete, just one more question. Your trick doesn't work for the latest word on the righ. I mean, If I have on the cell:

    [A1] word1, word2, word3, word4, double word

    and if I...
    Find what: <comma><space><asterisk><space><asterisk><comma>, i.e. ", * *" without the quotes
    Replace with: <nothing>, i.e. "" without the quotes

    The result will be:
    [A1] word1

    Instead of [A1] word1, word2, word3, word4

    Any idea how to trick the latest on the very right?

    Thanks.

  7. #7
    Registered User
    Join Date
    01-23-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: How to delete composed keywords separated by comma into a cell?

    Btw, I edited the 1st post, instead of deleting, is there some way to create a formula on B1 or find/replace to put them within double-quotes as shown below:

    [A1] word1, "jump up", word3, word4, "Old age", word6, "Sunny day", "holding a face",...word100

    Thanks.

  8. #8
    Valued Forum Contributor Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    685

    Re: How to delete composed keywords separated by comma into a cell?

    Quote Originally Posted by lucato View Post
    Hi Pete, just one more question. Your trick doesn't work for the latest word on the righ. I mean, If I have on the cell:

    [A1] word1, word2, word3, word4, double word

    and if I...
    Find what: <comma><space><asterisk><space><asterisk><comma>, i.e. ", * *" without the quotes
    Replace with: <nothing>, i.e. "" without the quotes

    The result will be:
    [A1] word1

    Instead of [A1] word1, word2, word3, word4

    Any idea how to trick the latest on the very right?

    Thanks.
    Yes - read my post again. I said to put comma-space before the first word and after the last word so that the operation only needs to be carried out once, then remove those after you have done it.

    Hope this helps.

    Pete

  9. #9
    Valued Forum Contributor Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Excel 2007
    Posts
    685

    Re: How to delete composed keywords separated by comma into a cell?

    Quote Originally Posted by lucato View Post
    Btw, I edited the 1st post, ....
    You should not edit a post that has been answered - it will make no sense to anyone reading it after you have changed it.

    The answer to your question is - No. The asterisk (wildcard) can be used to search for any characters, but it can't be used to substitute the same characters back into the text.

    Hope this helps.

    Pete

  10. #10
    Registered User
    Join Date
    01-23-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: How to delete composed keywords separated by comma into a cell?

    Quote Originally Posted by Pete_UK View Post
    Yes - read my post again. I said to put comma-space before the first word and after the last word so that the operation only needs to be carried out once, then remove those after you have done it.

    Hope this helps.

    Pete
    Ops, my fault, that's true, I forgot to add them in the beggining and end, I will try again.

    Thanks.

  11. #11
    Registered User
    Join Date
    01-23-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: How to delete composed keywords separated by comma into a cell?

    Quote Originally Posted by Pete_UK View Post
    You should not edit a post that has been answered - it will make no sense to anyone reading it after you have changed it.

    The answer to your question is - No. The asterisk (wildcard) can be used to search for any characters, but it can't be used to substitute the same characters back into the text.

    Hope this helps.

    Pete
    I'm sorry but I don't agree that won't make sense once it was just one insertion of extra doubt. It won't reflect in the other replyes.
    Regarding the "No" are you talking about the asterisk or NO that isn't possible to put them within double-quotes as shown below:
    [A1] word1, "jump up", word3, word4, "Old age", word6, "Sunny day", "holding a face",...word100

    Thanks and have a nice Sunday

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0