+ Reply to Thread
Results 1 to 6 of 6

count the number of times each string appears in a column and make a summary column

  1. #1
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    count the number of times each string appears in a column and make a summary column

    If ive got a column with 50 alpha-numeric entries where a few of them appear more than once in the column (and the rest appear only once), how do i make a count of how many times each entry occurs with a summary column with the details of the count. I wanted to try this in the attached file for column B tilted 'Secondary Id''s . In the attached file there is only 20 -30 entries but on another day this may be thousands.

    basically, I need to establish how many non-unique Secondary Id's that i have.
    Attached Files Attached Files
    Last edited by intothewild; 12-03-2012 at 06:47 PM.

  2. #2
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: count the number of times each string appears in a column and make a summary column

    actually seems like this is very non-trivial. found this working code elsewhere that gives the number of unique items in col b, but doesnt tell me which are duplicates, any ideas how to adapt to produce a summary column?

    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: count the number of times each string appears in a column and make a summary column

    Some things are simpler with builtin Excel tools, I'd use a Pivot Table to give you a quick unique count.

    Watch this Tutorial.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: count the number of times each string appears in a column and make a summary column

    Quote Originally Posted by JBeaucaire View Post
    Some things are simpler with builtin Excel tools, I'd use a Pivot Table to give you a quick unique count.

    Watch this Tutorial.
    Oh my god, why didnt i think of a pivot table!

    Love the Tutorial / Jing.. Big thanks for that.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: count the number of times each string appears in a column and make a summary column

    Also a simple countif does the same job.

    In F2 and copy down.

    =COUNTIF($B$2:$B$27,B2)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

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

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: count the number of times each string appears in a column and make a summary column

    If that takes care of your original query, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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