+ Reply to Thread
Results 1 to 2 of 2

Count Unique combinations of two columns

  1. #1
    Registered User
    Join Date
    07-23-2017
    Location
    Peoria, USA
    MS-Off Ver
    2016
    Posts
    55

    Count Unique combinations of two columns

    Hello Everyone,

    Kindly help me with an excel formula or VBA to count distinct values. So For each ID, how many distinct Customers are there. Here is an example of what I am looking

    ID Cust Distinct Count
    11 A 1
    11 A 1
    11 A
    22 D 2
    22 D 2
    22 C 2
    33 P 3
    33 Q 3
    33 R 3

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Count Unique combinations of two columns

    =SUM(IF($A$2:$A$200=A2,1/COUNTIF($B$2:$B$200,$B$2:$B$200),0))

    Enter Ctrl+Shift+Enter

+ 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. Finding unique combinations of 2 columns
    By Scooternm in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-23-2020, 12:41 PM
  2. [SOLVED] Unique Combinations from 4 Columns
    By ayvee0 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-12-2013, 06:44 PM
  3. Finding unique combinations across 3 columns using a function
    By Hdim in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-31-2013, 07:17 AM
  4. Replies: 0
    Last Post: 02-02-2013, 04:20 AM
  5. Replies: 4
    Last Post: 01-30-2010, 07:31 AM
  6. Count unique combinations
    By macanudo67 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2009, 11:55 AM
  7. [SOLVED] count unique combinations
    By mini in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2006, 07:50 AM

Tags for this Thread

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