+ Reply to Thread
Results 1 to 8 of 8

Count Distinct Values

  1. #1
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Count Distinct Values

    Good afternoon,

    Im looking for a formula that will either count unique values in a column or just identify what is duplicated but only show the duplicate for the 2nd value and not the first.

    Im using a simple Sumproduct
    Please Login or Register  to view this content.
    this will count everything in column F if column A has the number 1120 in it but in column F there is duplicate entries so i want to only count the distinct values in column F.

    Or use a spare column to look at column F and Flag the account as duplicated so i can then add this criteria into my sumproduct but i only want to flag the 2nd value as duplicate and not the first entrie otherwise when i add the criteria to the sumproduct im going to disregard anything that is a duplicate which i dont want to do, i just want to count the unique entries.

    Either way i need some help, can anyone assist me on this.

    Thanks

    DJ

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count Distinct Values

    Do you use excel>2003?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Count Distinct Values

    Yes im using 2010

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count Distinct Values

    Then, pls take a look to this. I think will helps you.

    http://www.excelforum.com/excel-form...ue-values.html

  5. #5
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Count Distinct Values

    Yes this works but im dealing with 20,000 rows of data and the code/formula takes so long to run, is there an easier way of doing this? Maybe if a column identified if it was a dupe or not but leving the first dupe as unique or will that causes the same problem with the time to run the code/formula?

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Count Distinct Values

    if your data in column F have possible duplicates, starting in F1, then, put this in G1 and drag-fill down:

    Please Login or Register  to view this content.
    what this will do is fill TRUEs and FALSEs in column G - TRUE for the FIRST instance of a value, FALSE for all the other instances of THAT value.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  7. #7
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Count Distinct Values

    Brilliant, thank you so much

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count Distinct Values

    ...Im using a simple Sumproduct

    =Sumproduct($A$1:$A$100="1120")*($F$1:$F$100))
    Point is that you never mentioned for 20000! rows. You mentioned 100 rows.

    Off course an Array formula will be slow managing 20000 rows.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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