View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default How do i count the number of unique values in a given column?

You got it right.....That formula works fine without a pivot table.

(Thanks for letting me know it worked for you)

***********
Regards,
Ron

XL2002, WinXP


"Bobby" wrote:

First, thanks so much for your quick reply!

I created a VERY simple spreadshett to test this out. I have 2 columns: A
is "names" and B is "numbers". Under A i have "bobby" listed 3 times and
"susy" listed 1 time. Under B i have 1, 2, 3, 4.

I wasn't sure if the forumla you provided was to be used through pivot
table, so what i did was simply insert it in cell A6 (just below the last
name in column A). I edited the formula to read:
=SUMPRODUCT((A2:A5<"")/COUNTIF(A2:A5,A2:A5&"")) - it worked PERFECT!!!
Thank you so much!

I wanted to ask you - is the way i have done it what you intended - or were
you thinking of using this formula in a pivot table? somehow?

"Ron Coderre" wrote:

Try this kind of formula:

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

Adjust range references to suit your situation.

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Bobby" wrote:

I have a huge data extract that i'm trying to sort through. The first thing
I want to do is count the number of unique entries in a given column. For
example, in my extract a "name" comes up many times - i want to count how
many "unique" names I have on my data sheet, in a specific column. I'm
pretty sure this is easily done with pivot tables - but can't figure it out
myself. (the pivot table keeps summing stuff up - it's not "counting").