#1   Report Post  
LatinViolin
 
Posts: n/a
Default count

there are 3 values in a column. they are 2, 2, 3. what formula or function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man
  #2   Report Post  
Ken Wright
 
Posts: n/a
Default

=SUMPRODUCT(1/COUNTIF(Range,Range))

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"LatinViolin" wrote in message
...
there are 3 values in a column. they are 2, 2, 3. what formula or

function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man



  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi

if your data is only numeric and doesn't contain blanks you can use the
following formula from Chip Pearson's web site
=SUM(N(FREQUENCY(A5:A7,A5:A7)0))

where A5:A7 is the range of your values.

If you will be dealing with text or your data could have blanks in it -
check out Chip's page on duplicates at:
http://www.cpearson.com/excel/duplicat.htm
- about half way down you'll find an article on counting unique entries in a
range.

Cheers
JulieD


"LatinViolin" wrote in message
...
there are 3 values in a column. they are 2, 2, 3. what formula or
function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man



  #4   Report Post  
John Mansfield
 
Posts: n/a
Default

The formula below assumes your data is in the range A1:A3. Enter this
formula as an array (select the range A1:A3, put the formula in the formula
bar, and press CTRL - SHIFT - ENTER at the same time):

=SUM(IF(FREQUENCY(A1:A3,A1:A3)0,1))

This Microsoft Knowledgebse article explains things a little mo

http://support.microsoft.com/kb/q268001/

----
Regards,
John Mansfield
http://www.pdbook.com
"LatinViolin" wrote:

there are 3 values in a column. they are 2, 2, 3. what formula or function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man

  #5   Report Post  
RagDyeR
 
Posts: n/a
Default

If the column might contain blank cells, try this:

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

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"LatinViolin" wrote in message
...
there are 3 values in a column. they are 2, 2, 3. what formula or function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man




  #6   Report Post  
LatinViolin
 
Posts: n/a
Default

thanks for your answer. great!

"Ken Wright" wrote:

=SUMPRODUCT(1/COUNTIF(Range,Range))

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"LatinViolin" wrote in message
...
there are 3 values in a column. they are 2, 2, 3. what formula or

function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man




  #7   Report Post  
LatinViolin
 
Posts: n/a
Default

thanks for your answer

"JulieD" wrote:

Hi

if your data is only numeric and doesn't contain blanks you can use the
following formula from Chip Pearson's web site
=SUM(N(FREQUENCY(A5:A7,A5:A7)0))

where A5:A7 is the range of your values.

If you will be dealing with text or your data could have blanks in it -
check out Chip's page on duplicates at:
http://www.cpearson.com/excel/duplicat.htm
- about half way down you'll find an article on counting unique entries in a
range.

Cheers
JulieD


"LatinViolin" wrote in message
...
there are 3 values in a column. they are 2, 2, 3. what formula or
function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man




  #8   Report Post  
LatinViolin
 
Posts: n/a
Default

it works perfect. that's all i needed.

"RagDyeR" wrote:

If the column might contain blank cells, try this:

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

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"LatinViolin" wrote in message
...
there are 3 values in a column. they are 2, 2, 3. what formula or function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man



  #9   Report Post  
LatinViolin
 
Posts: n/a
Default



"RagDyeR" wrote:

If the column might contain blank cells, try this:

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

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"LatinViolin" wrote in message
...
there are 3 values in a column. they are 2, 2, 3. what formula or function
do i use to determine how many different values exist in this set. the
answer is 2. there are two different values, 2 & 3. please help
--
cell man



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
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM
count a group of numbers but do not count duplicates Lisaml Excel Worksheet Functions 2 January 26th 05 11:19 PM
Count number to reach a cumulative value Bruce Excel Worksheet Functions 5 January 25th 05 05:14 PM
Count If Formula Mimi Excel Worksheet Functions 0 November 5th 04 11:55 AM
count based on two fields - need quickly JO Excel Worksheet Functions 1 November 1st 04 09:44 PM


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