Thread: Random numbers
View Single Post
  #2   Report Post  
Bryan Hessey
 
Posts: n/a
Default


John,

The problem is that you want random, and unique which means not
random.

You can achieve your results by putting
in cells A1 to O1
=int(rand()*99999999)

in cells A2 to O2 the numbers 1 to 15

in cells A3 to O3
=HLOOKUP(SMALL($A1:$O1,COLUMN()),$A1:$O2,2,FALSE)

This should give you a random shuffle each time the worksheet
calculates (press F9)


john liem Wrote:
I want to generate numbers (1 to 15) in cells A1 through O1, but the
number in each cells should be unique compare to the other cells, how
can I do it? If I use =randbetween(1,15), I can not get unique number
in each cell, some numbers are duplicated.


--
john liem



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=474360