# Thread: XL97 question on generating random numbers

1. ## XL97 question on generating random numbers

How do I generate random numbers 0-9 in ten adjacent cells, such that each number appears exactly once? TIA. Joe

2. ## Re: XL97 question on generating random numbers

I have had to do something like this myself. The way I did it is I am sure not the BEST] way. What I did is put my numbers 0 through 9 in a column. I then generated a random number in the adjacent column. Then select BOTH columns and sorted using the random number column.[img]/w3timages/icons/smile.gif[/img]

Now, if you have several of these "random" strings you need to generate, you can copy the random number column and do a "paste special" with the values only next to your second, third, fourth..... strings of 0 through 9. Each "paste special" will generate i different set of random numbers.

What I would like to be able to do is take a list of 10 names and have Excel automatically "randomize" those names. So far I have been too lazy to write a macro to do this. Guess I am hoping that there is some magical easy way to do this. [img]/w3timages/icons/grin.gif[/img]

Good Luck.
Larry P

3. ## Re: XL97 question on generating random numbers

Are you trying to create random numbers or a sequence? They aren't the same thing. Numbers 0-9 are a sequence. Numbers like 15, .0597, 240 are random.

4. ## Re: XL97 question on generating random numbers

Can't speak for Joe but what I would like to do is take a list of 10 names and put them in random order. My prior post describes how I have done this in the past. Was just wondering if there was a better way? Thanks for any help on this.

5. ## Re: XL97 question on generating random numbers

The RANDBETWEEN function may help you. This has to be added in. Have a look at the online help. It's a bit trickier to make them unique but should be possible without VB.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•