Results 1 to 5 of 5

Counting only unique values

Threaded View

  1. #2
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Counting only unique values

    enter this array / CSE formula in 'Sheet1 (2)' cell L2.

    =SUM(IF(FREQUENCY(IF('Violations 2'!$A$2:$A$434>='Sheet2 (2)'!$I$2,IF('Violations 2'!$A$2:$A$434<='Sheet2 (2)'!$I$3,IF('Violations 2'!$D$2:$D$434=--RIGHT('Sheet1 (2)'!L$1),MATCH('Violations 2'!$C$2:$C$434,'Violations 2'!$C$2:$C$434,0)))),(ROW($A$2:$A$434)-MIN(ROW($A$2:$A$434))+1))>0,1))
    then, you can drag it right.

    i got the result of 3 for dates in the range 23-06-10 and 28-07-10, for Level 1. by the way, what is X1? i could not find any corresponding column in your database, so i just left it alone.

    in case you just want to find the unique count for a specific date, you would simplify the formula thus:

    =SUM(IF(FREQUENCY(IF('Violations 2'!$A$2:$A$434>='Sheet1 (2)'!$K$1,IF('Violations 2'!$D$2:$D$434=--RIGHT('Sheet1 (2)'!L$1),MATCH('Violations 2'!$C$2:$C$434,'Violations 2'!$C$2:$C$434,0))),(ROW($A$2:$A$434)-MIN(ROW($A$2:$A$434))+1))>0,1))
    EDIT:

    the above formula had an error. i have fixed it; see the attached file. in order for the formula to be as automated as possible, the table header on Sheet2 (2) had to be changed to the one highlighted in Yellow and Red, with right-most values being X1, X2 and X3. sans that, the formula would become very cumbersome.

    also, keep in mind that you have to explain your needs well. as you can see, in this case, it took a couple of rounds for you to explain your requirements well. this sort of back and forth is a waste of time for both parties.
    Attached Files Attached Files
    Last edited by icestationzbra; 11-14-2012 at 08:00 PM.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

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