Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default Counting unique values in column

I have a column containing text values which could be unique, repetitive or
some rows could be empty. I need a formula that will count the total number
of unique values only, (not counting the empty cells) e.g. in the example
below, the answer will be "3":

Column A
Fish
Fish
(Empty)
Chicken
Rat
Chicken
(Empty)


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Counting unique values in column

Try

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

Mike

"WildWill" wrote:

I have a column containing text values which could be unique, repetitive or
some rows could be empty. I need a formula that will count the total number
of unique values only, (not counting the empty cells) e.g. in the example
below, the answer will be "3":

Column A
Fish
Fish
(Empty)
Chicken
Rat
Chicken
(Empty)


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default Counting unique values in column

Thanks Mike, sorted!

"Mike H" wrote:

Try

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

Mike

"WildWill" wrote:

I have a column containing text values which could be unique, repetitive or
some rows could be empty. I need a formula that will count the total number
of unique values only, (not counting the empty cells) e.g. in the example
below, the answer will be "3":

Column A
Fish
Fish
(Empty)
Chicken
Rat
Chicken
(Empty)


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 265
Default Counting unique values in column

In article ,
WildWill wrote:

I have a column containing text values which could be unique, repetitive or
some rows could be empty. I need a formula that will count the total number
of unique values only, (not counting the empty cells) e.g. in the example
below, the answer will be "3":

Column A
Fish
Fish
(Empty)
Chicken
Rat
Chicken
(Empty)


Here's another way...

=SUM(IF(FREQUENCY(IF(A2:A100<"",MATCH("~"&A2:A100 ,A2:A100&"",0)),ROW(A2:
A100)-ROW(A2)+1),1))

....confirmed with CONTROL+SHIFT+ENTER.

--
Domenic
http://www.xl-central.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
Excel Pivot Table - Counting Unique Values within one column of da GBONDI Excel Worksheet Functions 1 January 22nd 09 01:26 PM
Counting unique values blswes Excel Worksheet Functions 4 August 14th 08 06:50 PM
Counting Unique Values That Are Separate by Commas in a Column Rothman Excel Discussion (Misc queries) 2 March 25th 08 08:06 PM
Counting Unique Values Bob Excel Worksheet Functions 38 November 1st 06 09:00 AM
Counting unique entries in column A but only if specific values appear in columns B and C markx Excel Worksheet Functions 1 February 10th 05 11:52 AM


All times are GMT +1. The time now is 10:24 AM.

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"