View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Return a random number from a list

Assuming your numbers are in D1 - D8. Adjust as necessary

=INDEX(D1:D8,RANDBETWEEN(1,COUNTA(D1:D8)),1)

"Bhupinder Rayat" wrote:

Hi,

if i have the following list on sheet1
1
2
3
4
5
6
7
8

i want to know how to return any random number from that list on another
sheet.

e.g. sheet2

2
4
5
1
3
6
8
7

and i want to the array to return them in a different order everytime the
code is executed.

can anyone help please?

Many thanks,

Bhupinder.