LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default random numbers

Example: I have 1,036 nominees and each one has to be interviewed by 3
different people out of a group of 20 interviewers.

1,036/20 = 51.8 nominees per interviewer
1,036-(51*20)=16
So 16 people would have 52 nominees and 4 would have 51 nominees.
(!6*52)+4*51=1,036
And I can figure all this out ahead of time.

So I use INT(RAND()*20) in 3 columns and 1036 rows.

Of course some rows will have duplicates but I can, in another 3 columns
look at the rows with duplicates and assign another random number to
replace the duplicate, no big deal. In my test case I did this two
times and afterward only had 3 rows left with duplicates.

The problem is that INT(RAND()*20) has no idea that it can only have 51
zeros, 51 ones, 51 twos, etc or 52 instead of the 51, I can manually
adjust for the 4 51s and 16 52s.

In my test case here is what happened
165 zeros
158 ones
190 twos
150 threes
167 fours
142 fives
157 sixes
166 sevens
159 eights
147 etc
170
154
160
141
152
154
154
135
143
147
-----
3111 total random numbers assigned, I only wanted 1,036.

Not cool.

So I have to find something better or someway to limit my command with
another command while at the same time leaving the randomness.

Any ideas?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting numbers divisible by 4 from random numbers in ascending order ramana Excel Worksheet Functions 6 June 19th 07 06:41 PM
I want random numbers generated without repeating numbers Johncobb Excel Worksheet Functions 2 September 7th 06 04:52 PM
Can Excel pick random numbers from 1-300 and not repeat numbers? Julian Excel Discussion (Misc queries) 1 June 7th 06 07:17 AM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM


All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"