Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Lucas Lehmer
 
Posts: n/a
Default Number of different values in a range


Hello everyone,

Let's say I have a range A1:A1000, each cell containig a natural
number.
For my purposes these values are OK if and only if they are all
different.
Is there an easy way to count the number of different cells in a
range?

Many thanks!


--
Lucas Lehmer
------------------------------------------------------------------------
Lucas Lehmer's Profile: http://www.excelforum.com/member.php...o&userid=34514
View this thread: http://www.excelforum.com/showthread...hreadid=545853

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Number of different values in a range

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


--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"Lucas Lehmer"
wrote in message
news:Lucas.Lehmer.28f4em_1148652601.2249@excelforu m-nospam.com...

Hello everyone,

Let's say I have a range A1:A1000, each cell containig a natural
number.
For my purposes these values are OK if and only if they are all
different.
Is there an easy way to count the number of different cells in a
range?

Many thanks!


--
Lucas Lehmer
------------------------------------------------------------------------
Lucas Lehmer's Profile:

http://www.excelforum.com/member.php...o&userid=34514
View this thread: http://www.excelforum.com/showthread...hreadid=545853



  #4   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR
 
Posts: n/a
Default Number of different values in a range

Try this:

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

--

HTH,

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

"Lucas Lehmer"
wrote in message
news:Lucas.Lehmer.28f4em_1148652601.2249@excelforu m-nospam.com...

Hello everyone,

Let's say I have a range A1:A1000, each cell containig a natural
number.
For my purposes these values are OK if and only if they are all
different.
Is there an easy way to count the number of different cells in a
range?

Many thanks!


--
Lucas Lehmer
------------------------------------------------------------------------
Lucas Lehmer's Profile:
http://www.excelforum.com/member.php...o&userid=34514
View this thread: http://www.excelforum.com/showthread...hreadid=545853


  #5   Report Post  
Posted to microsoft.public.excel.misc
Lucas Lehmer
 
Posts: n/a
Default Number of different values in a range


Ok, guys.

Problem solved!
Thanks again, have a nice day!


--
Lucas Lehmer
------------------------------------------------------------------------
Lucas Lehmer's Profile: http://www.excelforum.com/member.php...o&userid=34514
View this thread: http://www.excelforum.com/showthread...hreadid=545853

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
How do I define a range using values in cells? Matthieu de Wit Excel Worksheet Functions 2 April 26th 06 09:43 PM
Assign one number to a number range Sue New Users to Excel 1 October 6th 05 01:21 AM
Summing values within a range rmellison Excel Discussion (Misc queries) 7 September 2nd 05 12:43 PM
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
MIN with zero values in the range Brenda Rueter Excel Discussion (Misc queries) 5 March 15th 05 09:44 PM


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