Formula to enter names in a column specific # of times
Improvement:
=INDEX(R1:R3,MATCH(RAND()*SUM(S1:S3)+1,T1:T3))
If you're using Excel 2003 or earlier and have the analysis ToolPak add-in
installed or, if you're using Excel 2007:
=INDEX(R1:R3,MATCH(RANDBETWEEN(1,SUM(S1:S3)),T1:T3 ))
For any version:
=INDEX(R1:R3,MATCH(ROUND(RAND()*SUM(S1:S3),0)+1,T1 :T3))
--
Biff
Microsoft Excel MVP
"T. Valko" wrote in message
...
No need to create the repeated name list.
Try this:
R S
1 Steve 4
2 Tom 7
3 Don 9
In T1 enter 1
Enter this formula in T2 and copy down to T3
=S1+T1
Then:
=INDEX(R1:R3,MATCH(RAND()*SUM(S1:S3)+1,T1:T3))
--
Biff
Microsoft Excel MVP
"Steve" wrote in message
...
I'm using the following to produce a random picking of names in the B
column.
=INDEX($B$1:$B$100,RAND()*100+1)
Each name is entered a different number of times in the B column, so that
the names entered the most have a higher probability if hitting.
What I'd like to have is another cells/columns that will auto-enter the
names in the B column the proper # of times.
E.g. If I have the following:
R S
1 Steve 4
2 Tom 7
3 Don 9
So that Steve is entered in the B column 4 times, Tom 7 times, Don 9
times,
etc.
Is this possible ?
Thanks,
Steve
|