Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Count Unique Values

Greetings,

I am really stuck would really appreciate some help.

I want to count the number of unique values in column B, but only if column
A contains a value.

A B
x abc
abc
x def
x
x ghi

Column B must also contain a value (not blank). So that means there are
three unique values in column B in the above table.

I was expecting to find a "count unique" function in Excel, but found
nothing.

Thanks!
Shane
Office Excel 2007 SP1

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count Unique Values

Try this array formula** :

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

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

--
Biff
Microsoft Excel MVP


"Shane Goodman" wrote in message
...
Greetings,

I am really stuck would really appreciate some help.

I want to count the number of unique values in column B, but only if
column A contains a value.

A B
x abc
abc
x def
x
x ghi

Column B must also contain a value (not blank). So that means there are
three unique values in column B in the above table.

I was expecting to find a "count unique" function in Excel, but found
nothing.

Thanks!
Shane
Office Excel 2007 SP1



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Count Unique Values

=SUM(N(FREQUENCY(IF((A1:A10="x")*(B1:B10<""),MATC H(B1:B10&"",B1:B10&"",)),MATCH(B1:B10&"",B1:B10&"" ,))0))

ctrl+shift+enter, not just enter


"Shane Goodman" wrote:

Greetings,

I am really stuck would really appreciate some help.

I want to count the number of unique values in column B, but only if column
A contains a value.

A B
x abc
abc
x def
x
x ghi

Column B must also contain a value (not blank). So that means there are
three unique values in column B in the above table.

I was expecting to find a "count unique" function in Excel, but found
nothing.

Thanks!
Shane
Office Excel 2007 SP1


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Count Unique Values

Biff,

It worked! I have trouble understanding anything nested three or more times,
so I just copies it exactly and replaced the range values.

Thanks for your help.
Shane.

"T. Valko" wrote in message
...
Try this array formula** :

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

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

--
Biff
Microsoft Excel MVP


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count Unique Values

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Shane Goodman" wrote in message
...
Biff,

It worked! I have trouble understanding anything nested three or more
times, so I just copies it exactly and replaced the range values.

Thanks for your help.
Shane.

"T. Valko" wrote in message
...
Try this array formula** :

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

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

--
Biff
Microsoft Excel MVP




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 fsfiligoi Excel Discussion (Misc queries) 5 June 4th 08 08:48 PM
How to count unique values? Annie Excel Worksheet Functions 0 March 3rd 06 07:17 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 03:46 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"