+ Reply to Thread
Results 1 to 5 of 5

count on unique

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    count on unique

    Im having some trouble trying to do a count on a code

    column D list locations.
    column A list the code.

    basically the value in column A shows once and under it, the locations are listed (column d)

    im trying to do a count to see how many times the city name occurs under a particular code (see column H) in the attachment.

    can someone pls help...im not sure how to approach this :S
    Attached Files Attached Files
    Last edited by jw01; 03-08-2012 at 03:07 AM.

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: count on unique

    try this, it is looking for any value after it finds the number you are looking for, thus counting the number of blank lines, and giving you you total number of entries under a heading in A.

    =MATCH("*",INDIRECT("A"&MATCH(G4,A:A,0)+1&":A10000"),0)

    let me know how it works.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: count on unique

    there are colored cells is that were the formula should be??

    if that's the case you can use this..
    this for the first colored cell

    =COUNTA(D2:D3)-COUNT(D2:D3)
    change the range... as per code..
    even if you insert cells it will count it, and counting values only spaces and numbers are not included..
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  4. #4
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,233

    Re: count on unique

    Quote Originally Posted by DGagnon View Post
    try this, it is looking for any value after it finds the number you are looking for, thus counting the number of blank lines, and giving you you total number of entries under a heading in A.

    =MATCH("*",INDIRECT("A"&MATCH(G4,A:A,0)+1&":A10000"),0)

    let me know how it works.
    that works really smooth wow...how is this working but genius!

  5. #5
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: count on unique

    The second match is looking for the value you want to count, once it finds it, that is being used to create a new range for the first match formula to use in looking for the next row that has an entry. Once it finds that, it outputs it as a number which happens to be the number you are looking for.

    A good challenge, and im happy i could help you.

+ 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