+ Reply to Thread
Results 1 to 4 of 4

Can't count distinct excluding certain groups

  1. #1
    Forum Contributor
    Join Date
    06-06-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    180

    Can't count distinct excluding certain groups

    Hi there,

    I am trying to create a formula to count distinct countries in the table below not including 'UK/US' or 'unclassified'. I can't figure it out. I have tried combining countif with an array formula but to no avail. So the answer For Group 1 would be 6 as there are 6 distinct countries not including UK/US & unclassified, the answer for group 2 would be 4.

    HTML Code: 
    Any help would be greatly appreciated.

    Regards,

    Forrestgump1980

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

    Cool Re: Can't count distinct excluding certain groups

    is that what you want?

    done with PivotTable and DataModel to get Distinct Count (PowerPivot add-in required)

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Can't count distinct excluding certain groups

    Hi there,

    The attached workbook contains a simpler, perhaps less powerful, method (e.g. it doesn't handle exclusions) but which might help to get you moving in the required direction.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Can't count distinct excluding certain groups

    Try below array formula

    Please Login or Register  to view this content.
    ...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.

    see the attached file
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

+ 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: 17
    Last Post: 04-11-2016, 11:14 PM
  2. [SOLVED] Distinct Count
    By pickslides in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-31-2015, 06:01 AM
  3. How to count distinct value
    By Ankit_Kumar in forum Excel General
    Replies: 1
    Last Post: 06-22-2015, 03:19 AM
  4. Use macro to copy groups of ceels excluding blank rows
    By MikeMeerkat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2015, 07:57 AM
  5. Distinct count using vba
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2012, 07:54 AM
  6. Count distinct?
    By Africa in forum Excel General
    Replies: 4
    Last Post: 12-09-2011, 08:34 AM
  7. Count Distinct only
    By John Moore in forum Excel General
    Replies: 4
    Last Post: 11-25-2005, 07:50 AM

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