Random Selector

  • Thread starter Thread starter Jerryyy
  • Start date Start date
J

Jerryyy

Hello all,
Can anyone tell me if there is a way to have Excel randomly choose
name for me? Example: I list all the players in major league histor
(5,000+) in colum A. I then would like to click on a button and hav
Excel randomly choose one of the 5,000 players in colum A. Is this a
all possible?
If this is not possible to do in Excel can anyone suggest anothe
program that I could do this in?
Also, I am a newb so please type slowly and clearly. :)

Thank you all in advance for all your work and effort in helping me i
my quest. I will be checking the board often.

Thanks Again,
Jerr
 
Hi
not a Button but a function. Put the following in cell B1
=INDEX(A1:5000,RANDBETWEEN(1,5000))

Each time you hit F9 the result in cell B1 will change
 
You could use the following Formula

=INDEX(A1:A5000,RANDBETWEEN(1,5000))

If you change calculation to manual you can assign the following macr
to a button.

Sub calculate()
Calculate
End Sub


Regards

Pet
 
Thank you for your super fast response time.
Is there anyway you can show me how to? Or tell me how to? I did this:
Placed 4 names in colum A 1-2-3-4. Then I copied the formula you poste
and placed it into the B1 cell. From there I am totally lost. Am
close?
Thanks again,
Jerr
 
Typo Frank,

=INDEX(A1:A5000,RANDBETWEEN(1,5000))

Also, Analysis-ToolPak must be installed for this to work.
 
The formula can be placed in any cell.

The A1:A5000 refers to how many cells you have used in column A

If you have used 4 change it to A1:A4 that way you won't keep getting
as an answer.

The second part Randbetween(1,5000) will return a number betwee
thoose two values. So change them as you need. for fou
Randbetween(1,4)

If the formula is not working make sure the Analysis Toolpack is turne
on.

Tools ==> Addins and tick the box next to Analysis Toolpack
 
And if you don't have the ATP installed you can use

=INT(RAND()*(5001-1)+1)

or for 4 in A1:A4

=INDEX(A1:A4,INT(RAND()*(5-1)+1))
 
Back
Top