+ Reply to Thread
Results 1 to 5 of 5

SUMPRODUCT function count the Unique values based on Multiple criteria

  1. #1
    Registered User
    Join Date
    07-15-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    66

    SUMPRODUCT function count the Unique values based on Multiple criteria

    Team,

    I am trying to find a solution to below problem ... ..

    I have set of Customer Data, which carry duplicate project ID's based on month selection.

    When i am trying to extract unique count based above 3 selection, i am getting incorrect counts. Please advise where i am doing wrong.

    Sample file attached with formula which i was trying to use.

    Cheers
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: SUMPRODUCT function count the Unique values based on Multiple criteria

    hi there. don't think such unique count for multiple conditional problem can be done via SUMPRODUCT. try this array formula:
    =SUM(IF(FREQUENCY(IF($B$3:$B$351=$H3,IF($C$3:$C$351=I$2,$D$3:$D$351)),$D$3:$D$351)>0,1))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,648

    Re: SUMPRODUCT function count the Unique values based on Multiple criteria

    In I3:

    =SUM(--(FREQUENCY(IF($B$3:$B$351=$H3,IF($C$3:$C$351=I$2,MATCH($D$3:$D$351,$D$3:$D$351,0))),ROW($D$3:$D$351)-ROW(D3)+1)>0))

    ... confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Once confirmed, drag copy across.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: SUMPRODUCT function count the Unique values based on Multiple criteria

    or you can use PivotTable with DataModel (Ex2010 Pro Plus will need PowerPivot install to use DataModel)

    ppdm.jpg

    datamodel.jpg

  5. #5
    Registered User
    Join Date
    07-15-2014
    Location
    Netherlands
    MS-Off Ver
    2010
    Posts
    66

    Re: SUMPRODUCT function count the Unique values based on Multiple criteria

    Thank you benishiryo ... this is helpful, however some reason i was very confident on Sumproduct to achieve this :-) .. thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 11
    Last Post: 11-16-2017, 07:11 AM
  2. Count unique values based on multiple criteria
    By Jonathan11235 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-19-2015, 10:02 PM
  3. SUMPRODUCT to count unique values AND more criteria...?
    By tangcla in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-07-2012, 01:59 AM
  4. Count unique values based on several criteria
    By evilgrin in forum Excel General
    Replies: 2
    Last Post: 10-10-2010, 03:50 PM
  5. [SOLVED] how to count unique values in excel based on multiple criteria
    By IDBUGM in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-15-2006, 12:10 PM

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