Random Item

C

capnsean

I -have- searched for a previous post regarding this problem, but came
up with nothing all that useful.

Problem: I need to generate a random item from a list.

I.E.: A1 = alpha
A2 = beta
A3 = gamma
etc.

B1 = RANDOM choice of alpha, beta, or gamma


Any help?
 
B

Bill Martin

How about: [B1] = OFFSET(A1,RANDBETWEEN(0,2),0)

You'll need to change the "2" to be the last row of the list you're picking from.

Bill
 
B

B. R.Ramachandran

Hi,

Let's suppose that the list of items (e.g., alpha, beta, gamma, .....) are
in A1:A100. Enter the formula in B1 and auto fill the formula down to the
last row.

=RAND()

In C1 enter the formula
=INDEX($A$1:$A$100,RANK(B1,$B$1:$B$100))

Every time you hit F9 the formula will generate a new random selection from
your list.

Regards,
B. R. Ramachandran
 
W

Witch-Doctor

I -have- searched for a previous post regarding this problem, but came
up with nothing all that useful.

Problem: I need to generate a random item from a list.

I.E.: A1 = alpha
A2 = beta
A3 = gamma
etc.

B1 = RANDOM choice of alpha, beta, or gamma


Any help?


Try: B1 = OFFSET(A1,INT(3*RAND()),0)
 
Top