View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Formula to enter names in a column specific # of times

I should have explained this in my original reply.

In essence the formula works as though each name was repeated n number of
times. From reading your post it seemed that you wanted the list with
repeats just for this single specific purpose. I didn't know whether the
list was used for other things.

Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Steve" wrote in message
...
Thanks for all your patience. I surely didn't mean to insist that I wanted
that list, I was just adding that to the original random solution that was
provied to me by this group a few years ago. With the Excel 2207 solution
below, it works like a charm, and like you stated, a much cleaner and
improved solution.

Thanks much,

Steve

"T. Valko" wrote:

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