How do you randomly assign numbers without getting duplicates?

M

Meesh

I'm trying to randomly assign a number between 1 and 9004 for a mailing list
in Excel. What I plan to do, is then sort cases from smallest number (1) to
largest number (9004) and take the first half to use in my sample for a
survey project. I want each 'case' in the list to recieve one number b/w 1
and 9004 with NO duplicates. The formulas I have tried using with no success
in eliminating duplicates are: =TRUNC(RAND()*9004) and
=TRUNC(RAND()*9004-1)+1.
Please help!
 
B

Bernie Deitrick

Meesh,

Let's say that your mailing list is in columns A to E. Fill column F with the numbers 1 to 9004
(enter a 1, then a two, and select those two cells and pull down). Then in column G, enter =RAND().
Then sort columns F and G by column G ascending, and then sort A to F by column F ascending.

HTH,
Bernie
MS Excel MVP
 

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