Extract only unique words from selected sentences

  • I have a column of values say :



    I am happy and sad
    I am extremely happy
    I am sad
    I am very sad
    I am very very sad



    Excel have to automatically identify and delete the words that have been repeated. In this case, after running macro I should be left with only :



    and
    Extremely



    because all other words are repetitive. i don't have a list of words, so Excel should automatically gives us only Unique words which haven't been used more than once.


    Does this macro is practicable?


    Thank you.

  • Re: Extract only unique words from selected sentences


  • Re: Extract only unique words from selected sentences


    Code works well, but my word list is very long. Pop-screen is out of window screen. How to put this list in the cells?

  • Re: Extract only unique words from selected sentences


    Change

    Code
    If dic.Count Then 
            MsgBox Join(dic.keys, vbLf) 
        Else


    to

    Code
    If dic.Count Then 
            [a1].Resize(dic.Count).Value = Application.Transpose(dic.keys) 
        Else


    Alter [a1] to suite

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!