#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Random Numbers

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Random Numbers

With numbers 1 to 15 in column A, put =RAND() in B1 and copy down to B15.
Sort columns on Column B and select first 5 (one for each day) from A.

Do similar exercise for 35 numbers, select top 10, allocating 2 per day.

HTH

"loida" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default Random Numbers

loida wrote on Tue, 24 Jul 2007 14:08:08 -0700:

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

Unless you allow the possibility of a number occuring more than
once, your numbers are not truly random (RANDBETWEEN() will
work). Two columns, one of numbers and the other of RAND() will
do what you want, sorting on the second column.


James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.verizon.not

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Random Numbers

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.



  #5   Report Post  
Posted to microsoft.public.excel.misc
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.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Random Numbers

You're welcome, and thanks for the feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"loida" wrote in message
...
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.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting numbers divisible by 4 from random numbers in ascending order ramana Excel Worksheet Functions 6 June 19th 07 06:41 PM
I want random numbers generated without repeating numbers Johncobb Excel Worksheet Functions 2 September 7th 06 04:52 PM
Can Excel pick random numbers from 1-300 and not repeat numbers? Julian Excel Discussion (Misc queries) 1 June 7th 06 07:17 AM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM


All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"