Random Numbers from a List of Numbers

D

dls61721

Can anyone tell me how to generate random numbers from a
list of numbers? RANDBETWEEN doesn't help, it includes
numbers that I don't/can't use.

Thanks!
 
P

Peo Sjoblom

What's your list of numbers look like?
Assume your list was

1
3
5
8
10
12
16
20
30
40


in A1:A10

to get a random number from the above list


=INDEX(A1:A10,MATCH(INT(RAND()*(11-1)+1),{1;2;3;4;5;6;7;8;9;10},0))

or hard coded

=INDEX({1;3;5;8;10;12;16;20;30;40},MATCH(INT(RAND()*(11-1)+1),{1;2;3;4;5;6;7
;8;9;10},0))
 

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

Similar Threads


Top