+ Reply to Thread
Results 1 to 4 of 4

selective counting of repeated elements (VBA macro)

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

    selective counting of repeated elements (VBA macro)

    Hi everybody,

    I've already started this thread within the General Help sub-forum but found out that the way I'm looking for is regarded to VBA programming. That's why I'm "moving" my post into here.

    This is the original thread:

    http://www.excelforum.com/excel-2007...ml#post2327343

    I hope someone can help me. Thanks in advance!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: selective counting of repeated elements (VBA macro)

    Hello buhnen,

    I have added a new worksheet with a button to run the macro. The new sheet shows the unique entries and the count of each. These changes have been added to the attached workbook.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: selective counting of repeated elements (VBA macro)

    buhnen,

    Are you trying to find out how many times the unique strings in column A are found in columns B and C?


    Detach/open workbook AdvancedFilter Unique - Selective counting of repeated elements - buhnen - VP - SDG13.xls, and run macro CountUnique.


    The above macro ran in 5 seconds on my Lenovo T61 laptop.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

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

    Smile Re: selective counting of repeated elements (VBA macro)

    Quote Originally Posted by stanleydgromjr View Post
    buhnen,

    Are you trying to find out how many times the unique strings in column A are found in columns B and C?


    Detach/open workbook AdvancedFilter Unique - Selective counting of repeated elements - buhnen - VP - SDG13.xls, and run macro CountUnique.


    The above macro ran in 5 seconds on my Lenovo T61 laptop.
    Hi Stanley,
    Thanks for your attempt but what I was intending to do was to count only the repeated values within the column A. Those values are tags that I will later print out, so I need to know how many of them I have to print. In the end what I needed was like Leith Cross did.

    Now I'm trying to find out how to mark with SOLVED this thread...

+ 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