A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do you randomly assign numbers without getting duplicates?



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2010, 06:10 PM posted to microsoft.public.excel.misc
meesh
external usenet poster
 
Posts: 9
Default How do you randomly assign numbers without getting duplicates?

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 a =TRUNC(RAND()*9004) and
=TRUNC(RAND()*9004-1)+1.
Please help!
  #2  
Old January 4th, 2010, 06:33 PM posted to microsoft.public.excel.misc
מיכאל (מיקי) אבידן
external usenet poster
 
Posts: 562
Default How do you randomly assign numbers without getting duplicates?

It seems to work for 10 cells so it should work for 9004, as well, if you'll
change the references.
http://img710.imageshack.us/img710/6681/nonamext.png
Micky


"Meesh" wrote:

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 a =TRUNC(RAND()*9004) and
=TRUNC(RAND()*9004-1)+1.
Please help!

  #3  
Old January 4th, 2010, 07:07 PM posted to microsoft.public.excel.misc
Bernie Deitrick
external usenet poster
 
Posts: 2,496
Default How do you randomly assign numbers without getting duplicates?

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


"Meesh" wrote in message
...
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 a =TRUNC(RAND()*9004) and
=TRUNC(RAND()*9004-1)+1.
Please help!



  #4  
Old January 4th, 2010, 07:22 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default How do you randomly assign numbers without getting duplicates?

See John McGimpsey's site for a UDF

http://www.mcgimpsey.com/excel/udfs/randint.html


Gord Dibben MS Excel MVP

On Mon, 4 Jan 2010 10:10:02 -0800, Meesh
wrote:

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 a =TRUNC(RAND()*9004) and
=TRUNC(RAND()*9004-1)+1.
Please help!


  #5  
Old January 4th, 2010, 08:35 PM posted to microsoft.public.excel.misc
מיכאל (מיקי) אבידן
external usenet poster
 
Posts: 562
Default How do you randomly assign numbers without getting duplicates?

If you don't have something agains add-ons - you may try installing "MOREFUNC"
One of its built-in functions is MRAND.
It generates a series of random integers without(!) repetitions
http://download.cnet.com/Morefunc/30...n;overviewHead
Micky


"מיכאל (מיקי) אבידן" wrote:

It seems to work for 10 cells so it should work for 9004, as well, if you'll
change the references.
http://img710.imageshack.us/img710/6681/nonamext.png
Micky


"Meesh" wrote:

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 a =TRUNC(RAND()*9004) and
=TRUNC(RAND()*9004-1)+1.
Please help!

  #6  
Old January 6th, 2010, 02:03 PM posted to microsoft.public.excel.misc
Bob I
external usenet poster
 
Posts: 10,698
Default How do you randomly assign numbers without getting duplicates?

Do RAND() first, Sort, THEN apply 1-9004 to the results.

Meesh wrote:

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 a =TRUNC(RAND()*9004) and
=TRUNC(RAND()*9004-1)+1.
Please help!


  #7  
Old April 2nd, 2010, 07:11 PM posted to microsoft.public.excel.misc
David J. Braden[_2_]
external usenet poster
 
Posts: 4
Default How do you randomly assign numbers without getting duplicates?

Great idea, imho.

Bob I wrote:
Do RAND() first, Sort, THEN apply 1-9004 to the results.

Meesh wrote:

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 a =TRUNC(RAND()*9004) and
=TRUNC(RAND()*9004-1)+1.
Please help!



--
Please keep response(s) solely within this thread.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.