Count Distinct Values?

G

Guest

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
 
R

RagDyeR

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!
==============================================
&""))

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
 
R

RagDyeR

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 !
--------------------------------------------------------------------

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!
==============================================
&""))

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
 
G

Guest

RagDyeR,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top