Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
tx12345
 
Posts: n/a
Default Showing a unique random number w/o duplicates


Hi

Let's just say I have a series of numbers:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

And then let's say I want to randomly cull from that list 5 unique
numbers:

eg,

3 12 7 11 9

I will want the numbers not to change, so the 'set' of five randomly
produced numbers remains exactly the same.

Let's say , then, I will also want to produce 20 rows of said strings
of five. This way the cells automatically generate 20 sets of 5
numbers with no duplicates within any string of 5

eg,

3 12 7 11 9
1 3 5 13 12
4 1 6 11 10

etc

with each string drawing randomly from the original set of 15 numbers
shown above, and once produced they stay there fixed in the worksheet.

Thoughts?

TIA!


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=399325

  #2   Report Post  
Max
 
Posts: n/a
Default

Try this program (full details inside):
http://www.savefile.com/files/7565212
File: Randomization_Lotto_program.xls

Think it fits the bill ..

The core functionality is driven via
the "RandLotto" UDF by Dave Hawley & JE McGimpsey

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"tx12345" wrote in
message ...

Hi

Let's just say I have a series of numbers:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

And then let's say I want to randomly cull from that list 5 unique
numbers:

eg,

3 12 7 11 9

I will want the numbers not to change, so the 'set' of five randomly
produced numbers remains exactly the same.

Let's say , then, I will also want to produce 20 rows of said strings
of five. This way the cells automatically generate 20 sets of 5
numbers with no duplicates within any string of 5

eg,

3 12 7 11 9
1 3 5 13 12
4 1 6 11 10

etc

with each string drawing randomly from the original set of 15 numbers
shown above, and once produced they stay there fixed in the worksheet.

Thoughts?

TIA!


--
tx12345
------------------------------------------------------------------------
tx12345's Profile:

http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=399325



  #3   Report Post  
Max
 
Posts: n/a
Default

Just enter the settings for the game in B6 to D6 in the sheet: Draw,
for example in your case:

From: 1 (in B6)
To: 15 (in C6)
Pick#: 5 (in D6)

Pick# is the number of numbers in a set to be picked for the game.

The settings entered will be used
in the formula in B2: =randlotto(B6,C6,D6)

Then just click the Draw button to generate as many random sets of unique
numbers from within the range defined under "From" and "To" as desired.

Generated sets of numbers will be frozen in col G from G2 down.

One click of the Draw button generates one set.

To reset/clear col G, just click the Reset button.

The RandLotto UDF and the subs Draw and Reset
for the 2 buttons described are listed in the "Notes" sheet

It's easy to use, and fun, too !
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


  #4   Report Post  
tx12345
 
Posts: n/a
Default


Hey Max,

Thanks once again. As a way to say thank you I'll give you a free copy
of my ebook on trading. It is a guide to 100% winning in the market.
Maybe you can make use of it some how. Just send me a private message
and I'll forward instructions how to get it if you are interested.


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=399325

  #5   Report Post  
Max
 
Posts: n/a
Default

You're welcome !

.. Just send me a private message
.. and I'll forward instructions how to get it if you are interested.


I'm interested but I don't have your address to send to ..

Could you drop me a line / the instructions at my address:
demechanik <at yahoo <dot com

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
---


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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Unique Number Thomas Cox Excel Worksheet Functions 1 August 10th 05 10:21 AM
How can I get Positive values only from the random number generat. Markw3700 Excel Discussion (Misc queries) 1 January 21st 05 12:37 AM
Running Total of Random Number Mr H Excel Discussion (Misc queries) 4 January 19th 05 10:35 PM
random number generation kurtrambis Excel Worksheet Functions 1 November 1st 04 09:23 PM


All times are GMT +1. The time now is 05:56 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"