Thread: Random Numbers
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
loida loida is offline
external usenet poster
 
Posts: 2
Default Random Numbers

Thank you, I like this one, it works.

"Ragdyer" wrote:

Why not pick those 5 different numbers all at the same time, once a week.

Enter the Rand function in an out-of-the-way location, say Z1:
=Rand()
And copy down to Z35.

Say in A1 to A5, you enter Mon. to Fri.

Then in B1, enter:
=INDEX(ROW(A$1:A$15),RANK(Z1,Z$1:Z$15))
And copy down to B5.

This gives you your random 5 out of 15 without replacement.

To get your 2 per day out of 35, enter this formula in say D1:

=INDEX(ROW($A$1:$A$35),RANK(INDEX($Z$1:$Z$35,(2*RO WS($1:1))-2+COLUMNS($A:A)),$Z$1:$Z$35))

And copy across to E1, then copy that 2 cell selection down to E5.

Youi'll now get your 2 per day random pick without replacement.

Each time you hit <F9, you'll get a new set of random numbers.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"loida" wrote in message
...
How do I set up a program to randomly select a number from a list between
1-15. On one, I need to pick 1 number everyday for 5 days without picking
the same number during those 5 days.

On the other I need to pick 2 numbers between 1 and 35 daily for 5 days,
again without repeating the same number during the 5 days.

Thank you for your help.