+ Reply to Thread
Results 1 to 3 of 3

Count unique values based on several criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    09-28-2010
    Location
    Latvia
    MS-Off Ver
    Excel 2007/2010
    Posts
    18

    Count unique values based on several criteria

    My formula is

    =COUNTIFS(A:A;"User";D:D;"A";E:E;"9")

    It counts the number of entries with these values. Now I need to exclude the entries for which the value in column C is duplicate. Please see the sample workbook.
    In this case, the value in C2 should be counted, however, other entries with "a1" in column C with the same user, date and type should be excluded as duplicates. G2 should return 3 instead of 4.

    Any tips?
    Attached Files Attached Files
    Last edited by evilgrin; 10-10-2010 at 03:50 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count unique values based on several criteria

    Using COUNTIFS

    =SUMPRODUCT(((A2:A10="User")*(D2:D10="A")*(E2:E10=9))/COUNTIFS(A2:A10;A2:A10&"";C2:C10;C2:C10&"";D2:D10;D2:D10&"";E2:E10;E2:E10&""))
    more traditional would be an Array

    =SUM(IF(FREQUENCY(IF((A2:A10="user")*(D2:D10="A")*(E2:E10=9);MATCH(C2:C10;C2:C10;0));ROW(C2:C10)-ROW(C2)+1)>0;1))
    confirmed with CTRL + SHIFT + ENTER
    in both cases note limited ranges - both are inefficient

  3. #3
    Registered User
    Join Date
    09-28-2010
    Location
    Latvia
    MS-Off Ver
    Excel 2007/2010
    Posts
    18

    Re: Count unique values based on several criteria

    Thanks! That solved 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