Closed Thread
Results 1 to 9 of 9

Count Distinct Values?

  1. #1
    bill_morgan
    Guest

    Count Distinct Values?

    The sheet contains 30,000 rows. I need to determine the number of distinct
    (unique) values in column A. What is the most efficient way to do this in
    Excel?

    For example, I can pull the data into Access and use a select query to
    "group by" column A to get the answer. But I need to get the answer within
    Excel.

    Thanks for your help ...

    Bill Morgan



  2. #2
    JulieD
    Guest

    Re: Count Distinct Values?

    Hi Bill

    check out
    http://www.cpearson.com/excel/duplicat.htm
    about half way down the page there's a section entitled counting unique
    entries in a range which give a couple of methods.

    --
    Cheers
    JulieD
    check out www.hcts.net.au/tipsandtricks.htm
    ....well i'm working on it anyway
    "bill_morgan" <[email protected]> wrote in message
    news:[email protected]...
    > The sheet contains 30,000 rows. I need to determine the number of distinct
    > (unique) values in column A. What is the most efficient way to do this in
    > Excel?
    >
    > For example, I can pull the data into Access and use a select query to
    > "group by" column A to get the answer. But I need to get the answer
    > within
    > Excel.
    >
    > Thanks for your help ...
    >
    > Bill Morgan
    >
    >




  3. #3
    RagDyeR
    Guest

    Re: Count Distinct Values?

    Try this:

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

    With this formula, you *cannot* use an entire column as a reference (A:A).
    --

    HTH,

    RD
    ==============================================
    Please keep all correspondence within the Group, so all may benefit!
    ==============================================
    &""))

    "bill_morgan" <[email protected]> wrote in message
    news:[email protected]...
    The sheet contains 30,000 rows. I need to determine the number of distinct
    (unique) values in column A. What is the most efficient way to do this in
    Excel?

    For example, I can pull the data into Access and use a select query to
    "group by" column A to get the answer. But I need to get the answer within
    Excel.

    Thanks for your help ...

    Bill Morgan




  4. #4
    RagDyeR
    Guest

    Re: Count Distinct Values?

    For some reason, the end of the formula was cut off.

    Try this:

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

    Regards,

    RD
    --------------------------------------------------------------------
    Please keep all correspondence within the Group, so all may benefit !
    --------------------------------------------------------------------

    "RagDyeR" <[email protected]> wrote in message
    news:[email protected]...
    Try this:

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

    With this formula, you *cannot* use an entire column as a reference (A:A).
    --

    HTH,

    RD
    ==============================================
    Please keep all correspondence within the Group, so all may benefit!
    ==============================================
    &""))

    "bill_morgan" <[email protected]> wrote in message
    news:[email protected]...
    The sheet contains 30,000 rows. I need to determine the number of distinct
    (unique) values in column A. What is the most efficient way to do this in
    Excel?

    For example, I can pull the data into Access and use a select query to
    "group by" column A to get the answer. But I need to get the answer within
    Excel.

    Thanks for your help ...

    Bill Morgan





  5. #5
    bj
    Guest

    Re: Count Distinct Values?

    fantastic

    "RagDyeR" wrote:

    > For some reason, the end of the formula was cut off.
    >
    > Try this:
    >
    > =SUMPRODUCT((A1:A30000<>"")/COUNTIF(A1:A30000,A1:A30000&""))
    > --
    >
    > Regards,
    >
    > RD
    > --------------------------------------------------------------------
    > Please keep all correspondence within the Group, so all may benefit !
    > --------------------------------------------------------------------
    >
    > "RagDyeR" <[email protected]> wrote in message
    > news:[email protected]...
    > Try this:
    >
    > =SUMPRODUCT((A1:A30000<>"")/COUNTIF(A1:A30000,A1:A30000
    >
    > With this formula, you *cannot* use an entire column as a reference (A:A).
    > --
    >
    > HTH,
    >
    > RD
    > ==============================================
    > Please keep all correspondence within the Group, so all may benefit!
    > ==============================================
    > &""))
    >
    > "bill_morgan" <[email protected]> wrote in message
    > news:[email protected]...
    > The sheet contains 30,000 rows. I need to determine the number of distinct
    > (unique) values in column A. What is the most efficient way to do this in
    > Excel?
    >
    > For example, I can pull the data into Access and use a select query to
    > "group by" column A to get the answer. But I need to get the answer within
    > Excel.
    >
    > Thanks for your help ...
    >
    > Bill Morgan
    >
    >
    >
    >
    >


  6. #6
    Registered User
    Join Date
    10-22-2004
    Posts
    1

    Additional Twist

    I have a similar situation. However, I have 3 sheets inside my spreadsheet and I need to count the unique values in the same column across all three sheets.

    For example, I can use the following formula (that I found in this thread) to count the values in one sheet:

    =SUMPRODUCT((G12:G247<>"")/COUNTIF(G12:G247,G12:G247&""))

    If my sheets are named SheetA, SheetB, SheetC, how can I modify this forumula to look at all three sheets? The column and row values are the same in each sheet. Since it is very likely that the same value will appear in one or more of the sheets, I can't just add the individual sheet sums together.

  7. #7
    RagDyeR
    Guest

    Re: Count Distinct Values?

    Thanks for the feed-back.
    --

    Regards,

    RD
    --------------------------------------------------------------------
    Please keep all correspondence within the Group, so all may benefit !
    --------------------------------------------------------------------

    "bj" <[email protected]> wrote in message
    news:[email protected]...
    fantastic

    "RagDyeR" wrote:

    > For some reason, the end of the formula was cut off.
    >
    > Try this:
    >
    > =SUMPRODUCT((A1:A30000<>"")/COUNTIF(A1:A30000,A1:A30000&""))
    > --
    >
    > Regards,
    >
    > RD
    > --------------------------------------------------------------------
    > Please keep all correspondence within the Group, so all may benefit !
    > --------------------------------------------------------------------
    >
    > "RagDyeR" <[email protected]> wrote in message
    > news:[email protected]...
    > Try this:
    >
    > =SUMPRODUCT((A1:A30000<>"")/COUNTIF(A1:A30000,A1:A30000
    >
    > With this formula, you *cannot* use an entire column as a reference (A:A).
    > --
    >
    > HTH,
    >
    > RD
    > ==============================================
    > Please keep all correspondence within the Group, so all may benefit!
    > ==============================================
    > &""))
    >
    > "bill_morgan" <[email protected]> wrote in message
    > news:[email protected]...
    > The sheet contains 30,000 rows. I need to determine the number of distinct
    > (unique) values in column A. What is the most efficient way to do this in
    > Excel?
    >
    > For example, I can pull the data into Access and use a select query to
    > "group by" column A to get the answer. But I need to get the answer

    within
    > Excel.
    >
    > Thanks for your help ...
    >
    > Bill Morgan
    >
    >
    >
    >
    >




  8. #8
    bill_morgan
    Guest

    Re: Count Distinct Values?

    Thank you, Julie. I'm going there now to check it out....

    "JulieD" wrote:

    > Hi Bill
    >
    > check out
    > http://www.cpearson.com/excel/duplicat.htm
    > about half way down the page there's a section entitled counting unique
    > entries in a range which give a couple of methods.
    >
    > --
    > Cheers
    > JulieD
    > check out www.hcts.net.au/tipsandtricks.htm
    > ....well i'm working on it anyway
    > "bill_morgan" <[email protected]> wrote in message
    > news:[email protected]...
    > > The sheet contains 30,000 rows. I need to determine the number of distinct
    > > (unique) values in column A. What is the most efficient way to do this in
    > > Excel?
    > >
    > > For example, I can pull the data into Access and use a select query to
    > > "group by" column A to get the answer. But I need to get the answer
    > > within
    > > Excel.
    > >
    > > Thanks for your help ...
    > >
    > > Bill Morgan
    > >
    > >

    >
    >
    >


  9. #9
    bill_morgan
    Guest

    Re: Count Distinct Values?

    RagDyeR,

    This works...! Not sure how, yet, but I am working on that. Thanks so much
    for your reply.

    "RagDyeR" wrote:

    > For some reason, the end of the formula was cut off.
    >
    > Try this:
    >
    > =SUMPRODUCT((A1:A30000<>"")/COUNTIF(A1:A30000,A1:A30000&""))
    > --
    >
    > Regards,
    >
    > RD
    > --------------------------------------------------------------------
    > Please keep all correspondence within the Group, so all may benefit !
    > --------------------------------------------------------------------
    >
    > "RagDyeR" <[email protected]> wrote in message
    > news:[email protected]...
    > Try this:
    >
    > =SUMPRODUCT((A1:A30000<>"")/COUNTIF(A1:A30000,A1:A30000
    >
    > With this formula, you *cannot* use an entire column as a reference (A:A).
    > --
    >
    > HTH,
    >
    > RD
    > ==============================================
    > Please keep all correspondence within the Group, so all may benefit!
    > ==============================================
    > &""))
    >
    > "bill_morgan" <[email protected]> wrote in message
    > news:[email protected]...
    > The sheet contains 30,000 rows. I need to determine the number of distinct
    > (unique) values in column A. What is the most efficient way to do this in
    > Excel?
    >
    > For example, I can pull the data into Access and use a select query to
    > "group by" column A to get the answer. But I need to get the answer within
    > Excel.
    >
    > Thanks for your help ...
    >
    > Bill Morgan
    >
    >
    >
    >
    >


Closed 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