Thread: Random Numbers
View Single Post
  #28  
Old September 12th, 2005, 01:58 AM
Max
external usenet poster
 
Posts: n/a
Default

"Steved" wrote:
... I get a double on the same line
.. I will overtime work out a solution using your program,


If I'm not mistaken, you got duplicates on the same line for some lines as
you didn't enter Bernd's UDF as a multi-cell array, re-his advice in his
original response below:

"Bernd Plumhoff" wrote:
then select cells A1:F1 ( this range selection is important)
enter: =UniqRandInt(40, false)
as array formula (CTRL+SHIFT+ENTER)
and copy this down to A10:F10.


Probably you might have "wrongly" array-entered the UDF into a *single*
cell, say A1, copied it across to F1, then filled A1:F1 down to F10. And
that's why you got a few lines with duplicates within the same line.

Try it again by selecting the range A1:F1 first, then
paste into the *formula bar*: =UniqRandInt(40, FALSE)
and array-enter with CSE

The same formula (with curly braces inserted by Excel):
{=UniqRandInt(40, FALSE)}
will appear in every cell within A1:F1
but each cell will return a different number

Then just select A1:F1 and fill down to say, F10, and there shouldn't be any
more duplicates within the same line (for any one line)

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--