Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allocating a dataset randomly to a fixed set

Status
Not open for further replies.

flashb

MIS
Jul 18, 2002
8
GB
Hi there,

I have a set of 100 unique items, which I need to allocate randomly between 10 'names'. Each of the 10 names should be allocated an even number ie. 10.
Is there a fairly simple bit of code that can do this?

Any help would be appreciated.

Thanks in advance

AshB
 
Use random numbers to allocate:

numof = 100
newval = Int((numof * Rnd) + 1)

Use this for 90 with appropriate code and the remainder for the 10th group to the last man.

rollie@bwsys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top