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 Excel equation explanation

Hello,
I have recently come across a use full equation that I use, however I am
perplexed about why it works. I am hoping someone can give me a clear
explanation, here it is:

{=sum(1/(countif(data,data))}

This is an array formula, used to count the distinct entries in a data set -
I know it works I just don't know why, and I have reduced it to subsets of
the equation but that just confused me more.

Thx, C
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Excel equation explanation

I Googled for "count unique excel" (without the quotes) and this was the
first link returned to me...

http://www.pcmag.com/article2/0,1759,1537551,00.asp

Rick


"Colin4" wrote in message
...
Hello,
I have recently come across a use full equation that I use, however I am
perplexed about why it works. I am hoping someone can give me a clear
explanation, here it is:

{=sum(1/(countif(data,data))}

This is an array formula, used to count the distinct entries in a data
set -
I know it works I just don't know why, and I have reduced it to subsets of
the equation but that just confused me more.

Thx, C


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Excel equation explanation

I believe it was former Excel MVP David Hager that came up with this, it was
mentioned in John Walkenbach's spreadsheet page in 1999. I can't believe
Neil Rubenking doesn't give credit to David.


--


Regards,


Peo Sjoblom


"Rick Rothstein (MVP - VB)" wrote in
message ...
I Googled for "count unique excel" (without the quotes) and this was the
first link returned to me...

http://www.pcmag.com/article2/0,1759,1537551,00.asp

Rick


"Colin4" wrote in message
...
Hello,
I have recently come across a use full equation that I use, however I am
perplexed about why it works. I am hoping someone can give me a clear
explanation, here it is:

{=sum(1/(countif(data,data))}

This is an array formula, used to count the distinct entries in a data
set -
I know it works I just don't know why, and I have reduced it to subsets
of
the equation but that just confused me more.

Thx, C




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Excel equation explanation

First of all, as written that formula is error prone if there can be any
blank cells in the range you are testing, this is a better way of using this
technique

=SUMPRODUCT(--(data<""),1/COUNTIF(data,data&""))


now to the way it works

COUNTIF(data,data&"")

will return an array of numbers based on the values occurrence like for
instance

{1;3;1;3;3;1;1;1;1}

where 3 represent that particular value occurring 3 times and the rest of
the values 1 time

this part

1/COUNTIF(data,data&"")

using the same data will return

{1;0.333333333333333;1;0.333333333333333;0.3333333 33333333;1;1;1;1}

then if you sum that array it will return 6

1+1/3+1+1/3+1/3+1+1+1


--


Regards,


Peo Sjoblom





"Colin4" wrote in message
...
Hello,
I have recently come across a use full equation that I use, however I am
perplexed about why it works. I am hoping someone can give me a clear
explanation, here it is:

{=sum(1/(countif(data,data))}

This is an array formula, used to count the distinct entries in a data
set -
I know it works I just don't know why, and I have reduced it to subsets of
the equation but that just confused me more.

Thx, C



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Excel equation explanation

Thanks for the quick response, explanations, & alternative methods!

"Peo Sjoblom" wrote:

First of all, as written that formula is error prone if there can be any
blank cells in the range you are testing, this is a better way of using this
technique

=SUMPRODUCT(--(data<""),1/COUNTIF(data,data&""))


now to the way it works

COUNTIF(data,data&"")

will return an array of numbers based on the values occurrence like for
instance

{1;3;1;3;3;1;1;1;1}

where 3 represent that particular value occurring 3 times and the rest of
the values 1 time

this part

1/COUNTIF(data,data&"")

using the same data will return

{1;0.333333333333333;1;0.333333333333333;0.3333333 33333333;1;1;1;1}

then if you sum that array it will return 6

1+1/3+1+1/3+1/3+1+1+1


--


Regards,


Peo Sjoblom





"Colin4" wrote in message
...
Hello,
I have recently come across a use full equation that I use, however I am
perplexed about why it works. I am hoping someone can give me a clear
explanation, here it is:

{=sum(1/(countif(data,data))}

This is an array formula, used to count the distinct entries in a data
set -
I know it works I just don't know why, and I have reduced it to subsets of
the equation but that just confused me more.

Thx, C






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
explanation on how to use the functions for excel willing to learn Excel Discussion (Misc queries) 1 December 1st 06 01:10 AM
explanation on how to use the functions for excel Teethless mama Excel Discussion (Misc queries) 0 November 30th 06 03:55 AM
Equation Editor- problem when editing an equation Gaby L. Excel Discussion (Misc queries) 0 September 27th 05 09:24 PM
Can I make pop up explanation boxes in Excel Explanation boxes Excel Discussion (Misc queries) 1 July 20th 05 06:05 AM
Explanation for Excel message "no more fonts may be applied"? Ralph Coomber Excel Discussion (Misc queries) 1 May 5th 05 12:49 PM


All times are GMT +1. The time now is 12:27 PM.

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"