Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Count Different Values in a column

I need to know the number of differing entries in a column.
For Example

Name:
George
Carol
Don
George
Don
Carol
Pat
Sam
George

Should return 5 because there are 5 different names.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Count Different Values in a column

=SUMPRODUCT((A2:A200<"")/COUNTIF(A2:A200,A2:A200&""))


--
__________________________________
HTH

Bob

"KJ MAN" wrote in message
...
I need to know the number of differing entries in a column.
For Example

Name:
George
Carol
Don
George
Don
Carol
Pat
Sam
George

Should return 5 because there are 5 different names.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count Different Values in a column

If the values are in the range A1:A10 then

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

The first part gives 1 for each cell that is not empty. Then divides it
with how many instances there is of this value.
Summing that gives you the "unique count".

The &"" is to avoid 0 and #DIV/0 when a cell is empty.

Ref: http://www.mrexcel.com/archive2/63500/73502.htm

Happy Programming!
- Suranthe

*** Sent via Developersdex http://www.developersdex.com ***
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 values in column only if value of another column is true MikeB Excel Worksheet Functions 4 September 10th 09 05:19 PM
Count Unique Values in 1 Column based on Date Range in another Column Brian Excel Worksheet Functions 14 May 17th 09 02:58 PM
Count cells w/values in column if the data in column a matches cri mdcgpw Excel Worksheet Functions 4 January 12th 09 11:55 PM
Count entries in one column based on values in another column Kurt Excel Worksheet Functions 7 January 10th 07 09:29 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM


All times are GMT +1. The time now is 05:34 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"