+ Reply to Thread
Results 1 to 3 of 3

Help counting unique values with another criteria

  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    4

    Help counting unique values with another criteria

    I am trying to count the unique number of events that occur in a certain location.

    Unique Value Count Help.xlsx

    What is the best formula to use?

    Thanks!!

  2. #2
    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: Help counting unique values with another criteria

    Try in K2 and copy down this ARRAY formula.

    =COUNT(1/FREQUENCY(IF($B$2:$B$20=J2,MATCH(J2&$A$2:$A$20,$B$2:$B$20&$A$2:$A$20,0)),ROW($A$2:$A$20)-1))



    Edit: If you have too many(thousands...?) of rows, my suggestion is to use a helper column and then a regular formula..This will be much more faster..
    Last edited by Fotis1991; 06-26-2013 at 05:41 AM. Reason: Edit
    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.

  3. #3
    Registered User
    Join Date
    06-30-2010
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: Help counting unique values with another criteria

    Hello sigma87

    Try this:
    For Mile1 =SUM(IF(FREQUENCY(MATCH(A2:A6,A2:A6,0),MATCH(A2:A6,A2:A6,0))>0,1))
    For Mile2 =SUM(IF(FREQUENCY(MATCH(A7:A12,A7:A12,0),MATCH(A7:A12,A7:A12,0))>0,1))
    For Mile3 =SUM(IF(FREQUENCY(MATCH(A13:A20,A13:A20,0),MATCH(A13:A20,A13:A20,0))>0,1))

    Have a nice day

    edited: The solution proposed by Fotis1991 is better.
    Last edited by cpmsimoes; 06-26-2013 at 05:59 AM.

+ 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