+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : selective counting of repeated elements

  1. #1
    Forum Contributor
    Join Date
    05-12-2008
    Location
    Schleswig-Holstein, Germany
    MS-Off Ver
    2010
    Posts
    102

    selective counting of repeated elements

    Hello everybody!

    I need your help about the following issue. I need to perform an operation as you can figure out if you follow from the attached screen capture.

    Within a column I have to count how many cells there are belonging to one class ( a class means here the same kind of value), keeping in mind that there are several kinds of classes.

    It seems a bit complex to me and I'm not even sure about if this is to be solved either with functions or macro programming (which I don't know about).

    Could you please help me with this?
    Thanks in advance
    Attached Images Attached Images
    Attached Files Attached Files

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

    Re: selective counting of repeated elements

    If your criteria is in column "I" as per your picture, then try:

    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.

  3. #3
    Forum Contributor
    Join Date
    05-12-2008
    Location
    Schleswig-Holstein, Germany
    MS-Off Ver
    2010
    Posts
    102

    Re: selective counting of repeated elements

    mmmm...nope, it hasn't worked .It only solves part of the problem...The variety of values displayed in the cells is so large that it doesn't worth to use the "count if" function and define the different criteria values that should be previously and manually looked up within the column.

    The type of solution I'm searching for already implies that the searching and identification of those different values is performed by the function itself, and not by the user.

    Imagine there might be around 100 different values within the column. In this case the user would have to define 100 times the criteria to match the count if operation. There has to be a way that Excel compare cells among them and returns all the set of values.

    For instance:

    "N9" appears 10 times
    "L9" appreas 3 times
    ...
    "RA01.1" appears one time

    without having to define "N9", "L9" and "RA01.1" like criteria search manually. Excel should already detect they are different values and count how many times they do appear.
    Last edited by buhnen; 06-21-2010 at 08:47 PM.

  4. #4
    Registered User
    Join Date
    06-20-2010
    Location
    Syracuse, NY
    MS-Off Ver
    MS Office 2007
    Posts
    14

    Re: selective counting of repeated elements

    I believe that what you are asking for is for excel to recognize that there are exactly 100 (guess) different designations in Column A, and to have excel return each designation with how many times that particular designation occurs within the column. If this is the case, what you are asking for is only possible through VBA coding.

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

    Re: selective counting of repeated elements

    Without knowing what you want the result to look like, this just devolves into a guessing game. But hey, fun can be found in many things. In the meantime change my formula from:

    Please Login or Register  to view this content.
    to:

    Please Login or Register  to view this content.
    and autofill it down 1804 rows.

    Cheers,

  6. #6
    Forum Contributor
    Join Date
    05-12-2008
    Location
    Schleswig-Holstein, Germany
    MS-Off Ver
    2010
    Posts
    102

    Re: selective counting of repeated elements

    Thanks Skid and Connection for your quick answers

    Yes, Skid is right: That is exactly what excel should do ....I hope someone else with more expertise on VBA programming could lend me a hand about this

  7. #7
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: selective counting of repeated elements

    Buhnen,

    feel free to start a new thread in the Programming forum. This way you'll get more attention, because of lower answer counts. Refer and link to this thread here, so people see your are not double posting.

    cheers,

  8. #8
    Forum Contributor
    Join Date
    05-12-2008
    Location
    Schleswig-Holstein, Germany
    MS-Off Ver
    2010
    Posts
    102

    Re: selective counting of repeated elements

    Thanks Teylyn. I've just done it.

+ 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