View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
cht13er cht13er is offline
external usenet poster
 
Posts: 141
Default unique random number in excel

On Apr 3, 7:47 pm, SeanW. wrote:
I tried that and it really didn't do what I need. What I need is five
columns, five rows each, of unique random numbers from a set range, i.e.
column A = 1 - 15
column B = 16 - 30
column C = 31 - 45

and so on, without duplicating any numbers in any column.

"cht13er" wrote:
On Apr 3, 6:59 pm, SeanW. wrote:
I am using excel to make bingo cards. I am using the =randbetween(*,*)
formula to generate the numbers but I keep getting duplicate numbers. How can
I ensure that each cell will have a unique number?


1) In Column A, enter in the range of numbers you need eg. 1 through
25
2) In column B, enter =rand() and fill for as many rows as you have
values in column A
3) Hit F9 (calculate)
4) Select column B, copy, paste-special values only.
5) Sort by column B, now you have the values you want (column A) in a
random order and without dups.


Chris


"I tried that and it really didn't do what I need. What I need is
five
columns, five rows each, of unique random numbers from a set range,
i.e.
column A = 1 - 15
column B = 16 - 30
column C = 31 - 45 "

You could just simply repeat the steps I gave you five times ... or
check out the other stuff Jim posted, whatever works for you :)

Chris