+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    09-08-2009
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 SP3
    Posts
    45

    Count the number of occurences of a value

    Hi there,

    I have been trying to solve a problem but i cant seem to get it to work. Basically I have a list and the list contains the same string multiple times. I am trying to take that list and print it in column D and then list in column E the number of times that string appears in column A. S for example I would like the list to output

    Col A | Col B| ....| Col D | Col E |
    String1__________String1 3
    String1__________String2 1
    String1__________String3 2
    String2
    String3
    String3


    I though I almost had it but I think I've spent too long looking at it and its become a blurr now!

    Thanks for any help anyone can offer me.

    Jag


    I have attached an example worksheet that I am currently using.
    Attached Files Attached Files
    Last edited by therealjag; 01-19-2010 at 06:27 AM.

  2. #2
    Forum Guru contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2010
    Posts
    1,335

    Re: Count the number of occurences of a value

    First u need to get unique values of items stroed in columnA

    Select All your values in column A then go to DATA > FILTER > ADVANCED FILTER
    Select COPY TO ANOTHER LOCATION and check UNIQUE VALUES ONLY.
    In the 3rd "Copy to" filed of dialog box select D1 and press OK

    After You've got unique values place this formula in E2 and copy down as far as needed

    Code:
    =COUNTIF($A$2:$A$851,D2)
    PS: U have 30 posts. And I think u usually solve your problems on this board. Please specify you xl version,
    Last edited by contaminated; 01-19-2010 at 06:12 AM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, «Born in USSR»
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Guru rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Count the number of occurences of a value

    The above procedure will only work if Column A has a header. This is required for Adv. Filter as otherwise String1 will appear twice.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  4. #4
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    Re: Count the number of occurences of a value

    If you're adding headers and considering Advanced Filter... my advice would be to just use a Pivot Table.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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