# Random Numbers With No Duplicates

1. ## Random Numbers With No Duplicates

I want to set up a column of numbers that will be random without any repeating numbers.

Example: If I set up for 1,000 rows, I would like the random numbers to be 1 to 1,000, but the catch would be to have no duplicates in the column.

It has been several years since I worked with Excel and I am sure this can be done with a macro, but I am not sure how to go about it right now.

2. ## Re: Random Numbers With No Duplicates

Would it be fair to say you want specified (not random) numbers in a random order?

If not, perhaps you could upload an example, showing what you're looking for, if so:
You could put the numbers 1 to 1000 in a column, then =rand() copied down alongside, then select the top rand() and click sort. Every sort will recalculate the rand()s and reorder the 1-1000

hth

3. ## Re: Random Numbers With No Duplicates

Originally Posted by Cheeky Charlie
Would it be fair to say you want specified (not random) numbers in a random order?

If not, perhaps you could upload an example, showing what you're looking for, if so:
You could put the numbers 1 to 1000 in a column, then =rand() copied down alongside, then select the top rand() and click sort. Every sort will recalculate the rand()s and reorder the 1-1000

hth
You phrased it much better that I did.

I want a list of specified numbers to be in a random order.

Thank you for helping me to clarify.

4. ## Re: Random Numbers With No Duplicates

Dennis, just as an aside, I noticed that your signature says you're using Excel XP Professional, but that's not really a version of Excel. It's probably either 2003 or 2007. I would recommend updating your profile to show which. As you've probably already found out, though, Charlie's solution works on either.

5. ## Re: Random Numbers With No Duplicates

The solution I used was to put my numbers in Column A, put a Rand() function in Col B, and then put a rank function in Col C.

Col B Formula:
``Please Login or Register  to view this content.``
Col C Formula
``Please Login or Register  to view this content.``
And then copy formulas cells B1 & C1 down as far as cells in Col A have a value.

This works fine if the list of numbers is from 1 to n...

6. ## Re: Random Numbers With No Duplicates

What an interesting variation, whatever flicks your switches, but if you just had two columns as I described, you could specify non-consecutive-integer values in column a and still randomly order them - a more generic solution (with fewer formulae)

CC

7. ## Re: Random Numbers With No Duplicates

Originally Posted by Cheeky Charlie
What an interesting variation, whatever flicks your switches, but if you just had two columns as I described, you could specify non-consecutive-integer values in column a and still randomly order them - a more generic solution (with fewer formulae)
CC
I already discoverd that if I later decided to have more, or non-sequential numbers, I would need to use your solution.

Thanks for the help.

8. ## Re: Random Numbers With No Duplicates

0.1, 0.2, 0.3, 0.4
=
sequential
=/=
consecutive integers
?

9. ## Re: Random Numbers With No Duplicates

They need not be numbers at all. It can be a list of cities, people, towns with only one vowel, ...

It's just a way to randomly order things, Dennis.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1