+ Reply to Thread
Results 1 to 9 of 9

Count duplicates and put their number in next column

  1. #1
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Count duplicates and put their number in next column

    Hello,

    I have a very large wordlist in excel which looks like:

    Column.A
    love
    love
    life
    store
    who
    zebra
    love
    store

    Now I would like to have the number of frequency of each word in Column B. For example the word "love" is three times there and the word "store" two times. I need it to look like:

    Column.A------------Column.B
    love-------------------3
    love-------------------3
    life---------------------1
    store------------------2
    who-------------------1
    zebra-----------------1
    love-------------------3
    store------------------2

    Thank you for ur help in advance.
    Attached Files Attached Files
    Last edited by wali; 02-21-2011 at 06:00 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,594

    Re: count dupplicates and put their number in next column

    Try in B2: =COUNTIF(A:A, A2) and pull down

  3. #3
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: count dupplicates and put their number in next column

    Hi,

    Try this:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  4. #4
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Re: count dupplicates and put their number in next column

    It works!! Thank you both

  5. #5
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Re: count dupplicates and put their number in next column

    I have a problem with the formula. Its too slow. I have about 0.5 Million entries and it is lasting and lasting and lasting!! I am not sure if it will finish in hours/days.
    Is there a faster way to do the job?

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,594

    Re: count dupplicates and put their number in next column

    This is fastest formula...

    Maybe you could create unque list of entries so it wont show you
    Please Login or Register  to view this content.
    but

    Please Login or Register  to view this content.
    Reucing number of formulas

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: count dupplicates and put their number in next column

    Use a Pivot Table - set the word as both Row Field and Data Field (will default to Count) - you will need column header value in A1.

    You can then use GETPIVOTDATA to retrieve the value in Column B.

    Alternatively sort your Data A-Z and use more efficient formulae
    (ie for first instance of given word use binary search to find last instance and compare row #'s - thereafter use prior result)
    Last edited by DonkeyOte; 02-21-2011 at 05:38 AM. Reason: embellished final sentence

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: count dupplicates and put their number in next column

    Figured I'd add a basic attachment to illustrate both.

    Sorting data is often the key to really efficient calculations when working with mass data.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Re: count dupplicates and put their number in next column

    Yes, it helped alot after I sorted the list. Thank you very much for taking the time for my problem

+ 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.6.0 RC 1