+ Reply to Thread
Results 1 to 5 of 5

Number of unique words in a column

  1. #1
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Number of unique words in a column

    Hello all,

    this is very similar to my last question. I am needing a way to count each unique word in a column. Each cell in the column contains a comma separated list (mostly one worded but there are some that are 2 words)

    Word Count Sample.xlsx

    thanks

  2. #2
    Registered User
    Join Date
    11-16-2014
    Location
    New York
    MS-Off Ver
    2011
    Posts
    25

    Re: Number of unique words in a column

    well if you can copy the whole column then you can Macguyver it:
    Copy the entire column,
    Paste into Notepad to get rid of the formatting,
    Copy paste into a word document,
    Go to Edit>Replace>
    Find: " , " Replace with "Paragraph mark" (If you can't find the paragraph mark its in the replace dropdown. You may need to select "more" or options where there should be a "Special drop down" and "Paragraph Mark is the first one
    Hit Replace all.
    In a new sheet in your workbook paste the words from the Word Document (now on top of one another)
    Select all, and go to Filter>Advanced> and check the "Unique Values only" box. That'll take out the doubles, and if you just delete all rows and starts at 1 you'll have your total. If you want to know how to use the COUNTIF function lemme know

  3. #3
    Registered User
    Join Date
    11-16-2014
    Location
    New York
    MS-Off Ver
    2011
    Posts
    25

    Re: Number of unique words in a column

    Well...whatever. One you have all your text in cells one on top of one another use this (replace your own range instead of A1:A10)

    =SUM(IF(FREQUENCY(IF(LEN(A1:A10)>0,MATCH(A1:A10,A1:A10,0),""), IF(LEN(A1:A10)>0,MATCH(A1:A10,A1:A10,0),""))>0,1))

    don't forget Crl+Shft+Entr and not enter

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Number of unique words in a column

    If this is a once-off, try this.

    1. copy E to a new column (F will do)
    2. with the copy selected, click Text2Columns/Delimited/next/comma/finish
    You will have something like this...
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    Customer White Red Blue Companys
    2
    John
    2
    2
    0
    White,White,Red,Red White White Red Red
    3
    Adam
    0
    3
    1
    Red,Red,Red,Navy Blue Red Red Red Navy Blue
    4
    Billy
    1
    2
    2
    Blue,Red,White,Blue,Red Blue Red White Blue Red
    5
    Total
    4


    E5=SUMPRODUCT((F2:J4<>"")/COUNTIF(F2:J4,F2:J4&""))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor
    Join Date
    05-30-2014
    Posts
    112

    Re: Number of unique words in a column

    Yes it is a once off. that worked and was simple enough.

    thanks

+ 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: 4
    Last Post: 07-16-2013, 09:45 AM
  2. [SOLVED] Unique Alphanumeric number increament in column B when data in column E is entered
    By Bharathi27 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-10-2013, 12:12 PM
  3. [SOLVED] Extract data[number] from a set of [words,number and symbol] and place into column
    By dragon_m0nsta in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-12-2012, 08:31 PM
  4. Overwrite the advanced filtered data serial number column with unique number
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-15-2012, 12:38 AM
  5. Count unique words appearing in a column once per row
    By eq2 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-19-2010, 12:09 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