Number of different values in a range

L

Lucas Lehmer

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!
 
R

RagDyeR

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" <[email protected]>
wrote in message

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!
 
Top