+ Reply to Thread
Results 1 to 4 of 4

count distinct values in excel

  1. #1
    Registered User
    Join Date
    07-01-2015
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    42

    count distinct values in excel

    Hi,

    How do I get unique values in a column? I do not want duplicate entries in my result.

    I tried using Filter but not got the output.

    Anna

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: count distinct values in excel

    Are you looking for DISTINCT values or UNIQUE values ?

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: count distinct values in excel

    To remove duplicates you could use the data tool "Remove Duplicates". To get a list of unique values in a column you could make a pivot table. There may be other options based on your data, which would probably require uploading a desensitized version.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: count distinct values in excel

    If you don't have too much data and there are no empty cells within the data range:

    =SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10))

    If you don't have too much data and there might be empty cells within the data range:

    =SUMPRODUCT((A1:A10<>"")/COUNTIF(A1:A10,A1:A10&""))

    If you have a lot of data and there are no empty cells within the data range:

    Array entered**:

    =SUM(IF(FREQUENCY(MATCH(A1:A1000,A1:A1000,0),ROW(A1:A1000)-ROW(A1)+1),1))

    If you have a lot of data and there might be empty cells within the data range:

    Array entered**:

    =SUM(IF(FREQUENCY(IF(A1:A1000<>"",MATCH(A1:A1000,A1:A1000,0)),ROW(A1:A1000)-ROW(A1)+1),1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] Excel - Count distinct occurences and copy unique values
    By random0munky in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-26-2015, 10:41 PM
  2. How to Count Distinct Values in Excel
    By kisanvikas2015 in forum Excel General
    Replies: 2
    Last Post: 05-19-2015, 10:12 AM
  3. Count Distinct Values
    By trevordsmith in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-02-2014, 09:21 PM
  4. [SOLVED] Count Distinct Values
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-20-2012, 07:39 AM
  5. Count of distinct (unique) values by day
    By velorian in forum Excel General
    Replies: 7
    Last Post: 12-06-2011, 05:03 PM
  6. Count distinct values with criteria
    By greencardioid in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-29-2008, 06:48 PM
  7. Count Distinct Values?
    By bill_morgan in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-26-2005, 10:06 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