+ Reply to Thread
Results 1 to 6 of 6

Count Distinct Multiple Criteria

  1. #1
    Forum Contributor
    Join Date
    07-29-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    255

    Count Distinct Multiple Criteria

    Hi

    I have attached a file. I wish to do a distinct count of Student ID by Year Level and Subject.

    Thanks, Q
    Attached Files Attached Files
    Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Count Distinct Multiple Criteria

    Array enter in G2 (paste, then confirm with Ctrl+Shift+Enter, instead of just Enter), then copy across and down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Good luck!

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Count Distinct Multiple Criteria

    Alternative:

    Please Login or Register  to view this content.
    Ctrl-Shift-Enter
    Attached Files Attached Files
    Quang PT

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Count Distinct Multiple Criteria

    an alternative way is with Power Query

    Excel 2016 (Windows) 32 bit
    G
    H
    I
    J
    8
    Subject
    7 8 9
    9
    Health
    2
    12
    4
    10
    Humanities
    6
    4
    2
    11
    Languages
    4
    12
    2
    12
    Literacy
    3
    8
    4
    13
    Math
    7
    8
    4
    Sheet: Sheet1

    Mcode:

    Please Login or Register  to view this content.
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Count Distinct Multiple Criteria

    or an ordinary formula (just ENTER:

    =SUM(INDEX(($C$2:$C$100=G$1)*($B$2:$B$100=$F2)*($A$2:$A$100<>"")/COUNTIFS($C$2:$C$100,$C$2:$C$100&"",$B$2:$B$100,$B$2:$B$100&"",$A$2:$A$100,$A$2:$A$100&""),0))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    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,958

    Re: Count Distinct Multiple Criteria

    @pickslides

    Is your forum profile up-to-date? If you have moved on from Excel 2010, then it will need updating, please.
    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.

+ 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. [SOLVED] Count Distinct Values with Multiple Criteria
    By stacey52891 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2020, 01:19 PM
  2. [SOLVED] Count of Distinct function/ Formula based on multiple criteria
    By naveeddil in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2019, 06:34 PM
  3. Sum column and count distinct values in another based on multiple criteria
    By mike.greene in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-12-2015, 11:50 AM
  4. [SOLVED] Count Distinct Numbers - Multiple Criteria
    By Gos-C in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-29-2013, 12:21 PM
  5. Distinct count based on multiple criteria - am I on the right track?
    By thedunnyman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2012, 07:36 AM
  6. Replies: 5
    Last Post: 03-13-2012, 06:05 AM
  7. Excel 2007 : Count distinct using multiple criteria
    By ExcelinginSeattle in forum Excel General
    Replies: 2
    Last Post: 12-17-2009, 02:26 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