#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Count unique values

I need some help from the experts! I'm trying to count how many documents
each employee created using this info:
Name Doc #
Joe 20
Joe 21
Joe 21
Joe 21
Paul 34
Paul 34
Paul 35
Paul 35
Paul 36
The result here would be: Joe created 2 documents and Paul created 3
documents.
How could I do it? I can't use filter because I have a lot of data.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count unique values

Assuming there are no empty cells in the document range.

Try this array formula** :

=COUNT(1/FREQUENCY(IF(A2:A10="Joe",B2:B10),B2:B10))

Or, use cells to hold the name:

D2 = Joe
D3 = Paul

=COUNT(1/FREQUENCY(IF(A$2:A$10=D2,B$2:B$10),B$2:B$10))

Then copy down as needed.


** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"fsfiligoi" wrote in message
...
I need some help from the experts! I'm trying to count how many documents
each employee created using this info:
Name Doc #
Joe 20
Joe 21
Joe 21
Joe 21
Paul 34
Paul 34
Paul 35
Paul 35
Paul 36
The result here would be: Joe created 2 documents and Paul created 3
documents.
How could I do it? I can't use filter because I have a lot of data.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Count unique values

With your posted data in A1:B10

Try this:
D2: Joe

This ARRAY FORMULA, committed with CTRL+SHIFT+ENTER,
instead of just ENTER, counts the unique doc numbers for Joe:
E2:
=COUNT(1/FREQUENCY(IF((A$2:A$20=D2)*ISNUMBER($B$2:$B$20),B$ 2:B$20),B$2:B$20))

Is that something you can work with?
Post back if you have more questions.

Regards,

Ron
Microsoft MVP - Excel


"fsfiligoi" wrote in message
...
I need some help from the experts! I'm trying to count how many documents
each employee created using this info:
Name Doc #
Joe 20
Joe 21
Joe 21
Joe 21
Paul 34
Paul 34
Paul 35
Paul 35
Paul 36
The result here would be: Joe created 2 documents and Paul created 3
documents.
How could I do it? I can't use filter because I have a lot of data.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Count unique values

Thank you so much guys!! I feel embarrased that it took me the whole morning
to do it manually and 1 minute to do it using the formula! I'll be using
this formula quite a bit! I tried both but for some reason only T. Valko's
formula worked.
Thanks again!
Fatima

"T. Valko" wrote:

Assuming there are no empty cells in the document range.

Try this array formula** :

=COUNT(1/FREQUENCY(IF(A2:A10="Joe",B2:B10),B2:B10))

Or, use cells to hold the name:

D2 = Joe
D3 = Paul

=COUNT(1/FREQUENCY(IF(A$2:A$10=D2,B$2:B$10),B$2:B$10))

Then copy down as needed.


** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"fsfiligoi" wrote in message
...
I need some help from the experts! I'm trying to count how many documents
each employee created using this info:
Name Doc #
Joe 20
Joe 21
Joe 21
Joe 21
Paul 34
Paul 34
Paul 35
Paul 35
Paul 36
The result here would be: Joe created 2 documents and Paul created 3
documents.
How could I do it? I can't use filter because I have a lot of data.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Count unique values

It looks like this formula works only with numbers. If I have duplicate text
or a dates instead of document numbers, do you know what I should to change
to make it work?
Am I asking too much now? : )

"T. Valko" wrote:

Assuming there are no empty cells in the document range.

Try this array formula** :

=COUNT(1/FREQUENCY(IF(A2:A10="Joe",B2:B10),B2:B10))

Or, use cells to hold the name:

D2 = Joe
D3 = Paul

=COUNT(1/FREQUENCY(IF(A$2:A$10=D2,B$2:B$10),B$2:B$10))

Then copy down as needed.


** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"fsfiligoi" wrote in message
...
I need some help from the experts! I'm trying to count how many documents
each employee created using this info:
Name Doc #
Joe 20
Joe 21
Joe 21
Joe 21
Paul 34
Paul 34
Paul 35
Paul 35
Paul 36
The result here would be: Joe created 2 documents and Paul created 3
documents.
How could I do it? I can't use filter because I have a lot of data.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count unique values

Am I asking too much now? : )

It depends on who you ask! <g

Assuming there are no empty cells in the document range.

Array entered** :

=COUNT(1/FREQUENCY(IF(A2:A10=D2,MATCH(B2:B10,B2:B10,0)),ROW (B2:B10)-MIN(ROW(B2:B10))+1))

Where D2 = name

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)


--
Biff
Microsoft Excel MVP


"fsfiligoi" wrote in message
...
It looks like this formula works only with numbers. If I have duplicate
text
or a dates instead of document numbers, do you know what I should to
change
to make it work?
Am I asking too much now? : )

"T. Valko" wrote:

Assuming there are no empty cells in the document range.

Try this array formula** :

=COUNT(1/FREQUENCY(IF(A2:A10="Joe",B2:B10),B2:B10))

Or, use cells to hold the name:

D2 = Joe
D3 = Paul

=COUNT(1/FREQUENCY(IF(A$2:A$10=D2,B$2:B$10),B$2:B$10))

Then copy down as needed.


** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"fsfiligoi" wrote in message
...
I need some help from the experts! I'm trying to count how many
documents
each employee created using this info:
Name Doc #
Joe 20
Joe 21
Joe 21
Joe 21
Paul 34
Paul 34
Paul 35
Paul 35
Paul 36
The result here would be: Joe created 2 documents and Paul created 3
documents.
How could I do it? I can't use filter because I have a lot of data.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count unique values, if ... Averitt Engineer[_2_] Excel Worksheet Functions 2 February 15th 07 06:41 PM
Count unique values Mary Excel Worksheet Functions 3 January 20th 06 08:56 PM
Count of Unique values Richard Excel Worksheet Functions 3 September 27th 05 05:46 AM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM
Count Unique Values annie Excel Worksheet Functions 1 June 9th 05 07:19 AM


All times are GMT +1. The time now is 05:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"