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

I only do that when I'm bored and there's nothing to play with!

Biff

"JMB" wrote in message
...
Don't tell me, I know - the 1 is superfluous <g.

"Biff" wrote:

Try this:

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

Biff

"bob" wrote in message
...
I have a column with the following dates:

11/23/05
11/23/05
11/23/05
11/25/05
11/25/05
11/28/05
12/1/05
12/1/05
12/1/05

I want a formula that will tell me how many unique dates there are in
the
column. Can anyone help?

thanks,
Bob






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

I only do that when I'm bored and there's nothing to play with!

Do you want to play with the following?

{=SUM(IF(FREQUENCY(IF(LEN(A2:A10)0,MATCH(A2:A10,A 2:A10,0),""), IF(LEN(A2:A10)0,MATCH(A2:A10,A2:A10,0),""))0,1)) }

If I remember correctly, the above is from Help which usually tells us the "inefficient" way of doing things. Glad to have someone like you, JMB and Luc around. By the way, Luc, you were brilliant the other day switching roles between the LOOKUP table and the data set (LOOKUP values).

Bob, I hope you don't mind me showing up. Also, please ignore the formulae I posted because I don't want to confuse you.

Epinn


"Biff" wrote in message ...
I only do that when I'm bored and there's nothing to play with!

Biff

"JMB" wrote in message
...
Don't tell me, I know - the 1 is superfluous <g.

"Biff" wrote:

Try this:

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

Biff

"bob" wrote in message
...
I have a column with the following dates:

11/23/05
11/23/05
11/23/05
11/25/05
11/25/05
11/28/05
12/1/05
12/1/05
12/1/05

I want a formula that will tell me how many unique dates there are in
the
column. Can anyone help?

thanks,
Bob







  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Counting Unique Values

I got the same answer with
=SUMPRODUCT(--(FREQUENCY(A2:A10,A2:A10)0))
as the original formula. If the data was text and I wanted to use
Frequency, I think you would have to use the formula you posted. Frequency
doesn't like text, but it ignores blanks - hence the IF(Len(..), Match(..),
"") combination.

If dealing with a contiguous range, however, using Sumproduct/Countif should
work w/both numbers and text (and you can include or exclude blanks) - so I
wouldn't use Frequency.

I think Frequency would be useful for dealing w/non-contigous cells
(containing numeric data - I think it was Harlan I saw use it for that
purpose).

From testing a little, it seems Frequency ignores blanks. If data is
numeric and you want to evaluate D3:E5 and G7:H9, then

=SUMPRODUCT(--(FREQUENCY((D3:E5,G7:H9),(D3:E5,G7:H9))0))

Not sure about if the cells are non-contiguous and the data is text.
Frequency doesn't like text and Len/Match don't seem to work w/two
dimensional arrays, much less non-contiguous cells - just based on my
observations, which doesn't mean someone can't do it.



"Epinn" wrote:

I only do that when I'm bored and there's nothing to play with!


Do you want to play with the following?

{=SUM(IF(FREQUENCY(IF(LEN(A2:A10)0,MATCH(A2:A10,A 2:A10,0),""), IF(LEN(A2:A10)0,MATCH(A2:A10,A2:A10,0),""))0,1)) }

If I remember correctly, the above is from Help which usually tells us the "inefficient" way of doing things. Glad to have someone like you, JMB and Luc around. By the way, Luc, you were brilliant the other day switching roles between the LOOKUP table and the data set (LOOKUP values).

Bob, I hope you don't mind me showing up. Also, please ignore the formulae I posted because I don't want to confuse you.

Epinn


"Biff" wrote in message ...
I only do that when I'm bored and there's nothing to play with!

Biff

"JMB" wrote in message
...
Don't tell me, I know - the 1 is superfluous <g.

"Biff" wrote:

Try this:

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

Biff

"bob" wrote in message
...
I have a column with the following dates:

11/23/05
11/23/05
11/23/05
11/25/05
11/25/05
11/28/05
12/1/05
12/1/05
12/1/05

I want a formula that will tell me how many unique dates there are in
the
column. Can anyone help?

thanks,
Bob







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
Counting unique values with criteria Kevin McCartney Excel Worksheet Functions 10 December 31st 09 04:02 PM
list unique values in a column beechum1 Excel Worksheet Functions 1 March 2nd 06 05:08 AM
Populate combo box with unique values only sjayar Excel Discussion (Misc queries) 1 November 7th 05 07:29 AM
Counting Values Alan Excel Worksheet Functions 6 June 9th 05 07:33 AM
Counting unique values + frequency Mike Ferguson Excel Worksheet Functions 3 November 24th 04 07:31 AM


All times are GMT +1. The time now is 12:54 AM.

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

About Us

"It's about Microsoft Excel"