select value of a random cell

F

flashing frank

hi,
i want to select the value of a random cell.
my table looks like this:

PHP code
-------------------

. A B C D
1 england red dog porsche
2 spain blue cat BMW
3 usa green mouse mercedes
4 greece yellow horse VW
5 germany black donkey jagua
-------------------


The function should choose a random value(cell) between B1:D5.

and also a function that chooses a random value
between A1:A5.

thanks
f
 
M

Max

One way ..

Assuming this table is in Sheet1, in A1:D5
. A B C D
1 england red dog porsche
2 spain blue cat BMW
3 usa green mouse mercedes
4 greece yellow horse VW
5 germany black donkey jaguar

In a new Sheet2
------------------
Put in A1: =INDEX(Sheet1!$A$1:$A$5,RANDBETWEEN(1,5))
Put in B1: =INDEX(Sheet1!$B$1:$D$5,RANDBETWEEN(1,5),RANDBETWEEN(1,3))

A1 will return a random value from Sheet1's A1:A5, while
B1 will return a random value from Sheet1's B1:D5

Just tap / press F9 to recalc and regenerate afresh

Freeze the values in A1:B1
by a copy > paste special > values elsewhere

Note: RANDBETWEEN requires the Analysis Toolpak
to be installed and enabled via: Tools > Add-Ins
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top