Randbetween

S

Steve Moss

i have 31 cells which have the following formula: =RANDBETWEEN(1,65). i.e.
they all generate a random number between 1 and 65, this number relates to a
row on another sheet.
what i am trying to do is work it so each box generates a random number
which doesnt get repeated in any other box, what do i need to add to the
formula for this to be possible.
 
M

Mike H

Hi,

Without resorting to code you could put the numbers 1 to 65 in column A
Then the formula =Rand() in column B and drag down to Row 65

Select column A & B and sort on column B. The top 31 numbers in column A are
guaranteed unique and within your range

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top